2007-09-20 18:09:08 -04:00
|
|
|
USING: definitions help help.markup kernel sequences tools.test
|
2009-01-22 23:30:43 -05:00
|
|
|
words parser namespaces assocs generic io.streams.string accessors
|
|
|
|
strings math ;
|
2008-03-01 17:00:45 -05:00
|
|
|
IN: help.markup.tests
|
2007-09-20 18:09:08 -04:00
|
|
|
|
|
|
|
TUPLE: blahblah quux ;
|
|
|
|
|
2008-02-15 23:20:31 -05:00
|
|
|
[ "an int" ] [ [ { "int" } $instance ] with-string-writer ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2008-11-22 02:24:05 -05:00
|
|
|
[ ] [ \ quux>> print-topic ] unit-test
|
|
|
|
[ ] [ \ >>quux print-topic ] unit-test
|
|
|
|
[ ] [ \ blahblah? print-topic ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
|
|
|
|
: fooey "fooey" throw ;
|
|
|
|
|
2008-11-22 02:24:05 -05:00
|
|
|
[ ] [ \ fooey print-topic ] unit-test
|
2007-09-20 18:09:08 -04:00
|
|
|
|
2008-11-22 02:24:05 -05:00
|
|
|
[ ] [ gensym print-topic ] unit-test
|
2009-01-22 23:30:43 -05:00
|
|
|
|
|
|
|
[ "a string" ]
|
|
|
|
[ [ { $or string } print-element ] with-string-writer ] unit-test
|
|
|
|
|
|
|
|
[ "a string or an integer" ]
|
|
|
|
[ [ { $or string integer } print-element ] with-string-writer ] unit-test
|
|
|
|
|
|
|
|
[ "a string, a fixnum, or an integer" ]
|
|
|
|
[ [ { $or string fixnum integer } print-element ] with-string-writer ] unit-test
|
2009-02-09 02:47:31 -05:00
|
|
|
|
|
|
|
\ print-element must-infer
|
|
|
|
\ print-topic must-infer
|