]> gitweb.factorcode.org Git - factor.git/blob - basis/help/topics/topics-tests.factor
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
[factor.git] / basis / help / topics / topics-tests.factor
1 USING: accessors definitions help help.topics help.crossref
2 help.markup help.syntax kernel sequences tools.test words parser
3 namespaces assocs source-files eval ;
4 IN: help.topics.tests
5
6 ! Test help cross-referencing
7
8 { } [ "Test B" { "Hello world." } <article> { "test" "b" } add-article ] unit-test
9
10 { } [ "Test A" { { $subsection { "test" "b" } } } <article> { "test" "a" } add-article ] unit-test
11
12 SYMBOL: foo
13
14 { } [ "Test A" { { $subsection foo } } <article> { "test" "a" } add-article ] unit-test
15
16 ! Test article location recording
17
18 { } [
19     {
20         "USE: help.syntax"
21         "ARTICLE: { \"test\" 1 } \"Hello\""
22         "\"abc\""
23         "\"def\" ;"
24     } "\n" join
25     [
26         "testfile" source-file file set
27         eval( -- )
28     ] with-scope
29 ] unit-test
30
31 { { "testfile" 2 } }
32 [ { "test" 1 } articles get at loc>> ] unit-test
33
34 { } [ { "test" 1 } remove-article ] unit-test