remove math.blas.syntax and merge parsing words into math.blas.vectors/matrices
[factor/jcg.git] / basis / help / crossref / crossref-tests.factor
blob2e8c17394421986424030a5902d5b9577548c6ca
1 IN: help.crossref.tests
2 USING: help.crossref help.topics help.markup tools.test words
3 definitions assocs sequences kernel namespaces parser arrays
4 io.streams.string continuations debugger compiler.units eval ;
6 [ ] [
7     "IN: help.crossref.tests USING: help.syntax help.markup ; : foo ; HELP: foo \"foo is great\" ; ARTICLE: \"foo\" \"Foo\" { $subsection foo } ;" eval
8 ] unit-test
10 [ $subsection ] [
11     "foo" article-content first first
12 ] unit-test
14 [ t ] [
15     "foo" article-children
16     "foo" "help.crossref.tests" lookup 1array sequence=
17 ] unit-test
19 [ "foo" ] [ "foo" "help.crossref.tests" lookup article-parent ] unit-test
21 [ ] [
22     [ "foo" "help.crossref.tests" lookup forget ] with-compilation-unit
23 ] unit-test
25 [ ] [
26     "IN: help.crossref.tests USING: help.syntax help.markup ; : bar ; HELP: bar \"bar is great\" ; ARTICLE: \"bar\" \"Bar\" { $subsection bar } ;" eval
27 ] unit-test
29 [ ] [
30     "IN: ayy USE: help.syntax ARTICLE: \"b\" \"B\" ;"
31     <string-reader> "ayy" parse-stream drop
32 ] unit-test
34 [ ] [
35     "IN: azz USE: help.syntax USE: help.markup ARTICLE: \"a\" \"A\" { $subsection \"b\" } ;"
36     <string-reader> "ayy" parse-stream drop
37 ] unit-test
39 [ ] [
40     "IN: ayy USE: help.syntax ARTICLE: \"c\" \"C\" ;"
41     <string-reader> "ayy" parse-stream drop
42 ] unit-test
44 [ ] [
45     "IN: azz USE: help.syntax USE: help.markup ARTICLE: \"a\" \"A\" { $subsection \"c\" } ;"
46     <string-reader> "ayy" parse-stream drop
47 ] unit-test
49 [ ] [
50     [
51         "IN: azz USE: help.syntax USE: help.markup ARTICLE: \"yyy\" \"YYY\" ; ARTICLE: \"xxx\" \"XXX\" { $subsection \"yyy\" } ; ARTICLE: \"yyy\" \"YYY\" ;"
52         <string-reader> "parent-test" parse-stream drop
53     ] [ :1 ] recover
54 ] unit-test
56 [ "xxx" ] [ "yyy" article-parent ] unit-test