factor/basis/help/topics/topics-tests.factor

35 lines
907 B
Factor
Raw Normal View History

2008-08-31 20:28:26 -04:00
USING: accessors definitions help help.topics help.crossref
help.markup help.syntax kernel sequences tools.test words parser
namespaces assocs source-files eval ;
2008-03-01 17:00:45 -05:00
IN: help.topics.tests
2007-09-20 18:09:08 -04:00
! Test help cross-referencing
{ } [ "Test B" { "Hello world." } <article> { "test" "b" } add-article ] unit-test
2007-09-20 18:09:08 -04:00
{ } [ "Test A" { { $subsection { "test" "b" } } } <article> { "test" "a" } add-article ] unit-test
2007-09-20 18:09:08 -04:00
SYMBOL: foo
{ } [ "Test A" { { $subsection foo } } <article> { "test" "a" } add-article ] unit-test
2007-09-20 18:09:08 -04:00
! Test article location recording
{ } [
2007-09-20 18:09:08 -04:00
{
"USE: help.syntax"
"ARTICLE: { \"test\" 1 } \"Hello\""
"\"abc\""
"\"def\" ;"
} "\n" join
[
"testfile" path>source-file current-source-file set
2009-04-17 16:49:21 -04:00
eval( -- )
2007-09-20 18:09:08 -04:00
] with-scope
] unit-test
{ { "testfile" 2 } }
[ { "test" 1 } articles get at loc>> ] unit-test
2007-09-20 18:09:08 -04:00
{ } [ { "test" 1 } remove-article ] unit-test