1 USING: help.crossref help.topics help.markup tools.test words
2 definitions assocs sequences kernel namespaces parser arrays
3 io.streams.string continuations debugger compiler.units eval
5 IN: help.crossref.tests
8 "IN: help.crossref.tests USING: help.syntax help.markup ; : foo ( -- ) ; HELP: foo \"foo is great\" ; ARTICLE: \"foo\" \"Foo\" { $subsection foo } ;" eval( -- )
12 "foo" article-content first first
16 "foo" article-children
17 "foo" "help.crossref.tests" lookup-word >link 1array sequence=
20 { "foo" } [ "foo" "help.crossref.tests" lookup-word article-parent ] unit-test
23 [ "foo" "help.crossref.tests" lookup-word forget ] with-compilation-unit
27 "IN: help.crossref.tests USING: help.syntax help.markup ; : bar ( -- ) ; HELP: bar \"bar is great\" ; ARTICLE: \"bar\" \"Bar\" { $subsection bar } ;" eval( -- )
31 "IN: ayy USE: help.syntax ARTICLE: \"b\" \"B\" ;"
32 <string-reader> "ayy" parse-stream drop
36 "IN: azz USE: help.syntax USE: help.markup ARTICLE: \"a\" \"A\" { $subsection \"b\" } ;"
37 <string-reader> "ayy" parse-stream drop
41 "IN: ayy USE: help.syntax ARTICLE: \"c\" \"C\" ;"
42 <string-reader> "ayy" parse-stream drop
46 "IN: azz USE: help.syntax USE: help.markup ARTICLE: \"a\" \"A\" { $subsection \"c\" } ;"
47 <string-reader> "ayy" parse-stream drop
52 "IN: azz USE: help.syntax USE: help.markup ARTICLE: \"yyy\" \"YYY\" ; ARTICLE: \"xxx\" \"XXX\" { $subsection \"yyy\" } ; ARTICLE: \"yyy\" \"YYY\" ;"
53 <string-reader> "parent-test" parse-stream drop
57 { "xxx" } [ "yyy" article-parent ] unit-test
59 ARTICLE: "crossref-test-1" "Crossref test 1"
62 ARTICLE: "crossref-test-2" "Crossref test 2"
63 { $markup-example { $subsection "crossref-test-1" } } ;
65 { { } } [ "crossref-test-2" >link article-children ] unit-test