]> gitweb.factorcode.org Git - factor.git/blob - basis/help/markup/markup-tests.factor
9b928f3691cb84d7e15bf71b773b04eeb4f2d046
[factor.git] / basis / help / markup / markup-tests.factor
1 USING: definitions help help.markup kernel sequences tools.test
2 words parser namespaces assocs generic io.streams.string accessors
3 strings math ;
4 IN: help.markup.tests
5
6 TUPLE: blahblah quux ;
7
8 [ "an int" ] [ [ { "int" } $instance ] with-string-writer ] unit-test
9
10 [ ] [ \ quux>> print-topic ] unit-test
11 [ ] [ \ >>quux print-topic ] unit-test
12 [ ] [ \ blahblah? print-topic ] unit-test
13
14 : fooey ( -- * ) "fooey" throw ;
15
16 [ ] [ \ fooey print-topic ] unit-test
17
18 [ ] [ gensym print-topic ] unit-test
19
20 [ "a string" ]
21 [ [ { $or string } print-element ] with-string-writer ] unit-test
22
23 [ "a string or an integer" ]
24 [ [ { $or string integer } print-element ] with-string-writer ] unit-test
25
26 [ "a string, a fixnum, or an integer" ]
27 [ [ { $or string fixnum integer } print-element ] with-string-writer ] unit-test
28
29 \ print-element must-infer
30 \ print-topic must-infer