factor/core/help/test/topics.factor

37 lines
796 B
Factor
Raw Normal View History

2006-06-22 22:36:56 -04:00
IN: temporary
2006-08-28 00:53:55 -04:00
USING: definitions help kernel sequences test words parser
namespaces hashtables ;
2006-06-22 22:36:56 -04:00
! Test help cross-referencing
"Test B" { "Hello world." } f <article> { "test" "b" } add-article
2006-06-22 22:36:56 -04:00
"Test A" { { $subsection { "test" "b" } } } f <article> { "test" "a" } add-article
2006-06-22 22:36:56 -04:00
{ "test" "a" } remove-article
[ t ] [ { "test" "b" } parents empty? ] unit-test
SYMBOL: foo
2006-08-02 16:53:26 -04:00
{ "test" "a" } "Test A" { { $subsection foo } } f <article> add-article
2006-06-22 22:36:56 -04:00
2006-08-28 00:53:55 -04:00
! Test article location recording
[ ] [
{
"ARTICLE: { \"test\" 1 } \"Hello\""
"\"abc\""
"\"def\" ;"
} "\n" join
[
"testfile" file set
eval
] with-scope
] unit-test
[ { "testfile" 1 } ]
[ { "test" 1 } articles get hash article-loc ] unit-test
[ ] [ { "test" 1 } remove-article ] unit-test