factor/basis/vocabs/prettyprint/prettyprint-tests.factor

45 lines
1.2 KiB
Factor
Raw Normal View History

2009-09-20 23:42:40 -04:00
USING: vocabs.prettyprint tools.test io.streams.string eval ;
IN: vocabs.prettyprint.tests
: manifest-test-1 ( -- string )
2009-09-20 23:42:40 -04:00
"""USING: kernel namespaces vocabs.parser vocabs.prettyprint ;
2009-09-20 23:42:40 -04:00
<< manifest get pprint-manifest >>""" ;
[
2009-09-20 23:42:40 -04:00
"""USING: kernel namespaces vocabs.parser vocabs.prettyprint ;"""
]
[ [ manifest-test-1 eval( -- ) ] with-string-writer ] unit-test
: manifest-test-2 ( -- string )
2009-09-20 23:42:40 -04:00
"""USING: kernel namespaces vocabs.parser vocabs.prettyprint ;
IN: vocabs.prettyprint.tests
2009-09-20 23:42:40 -04:00
<< manifest get pprint-manifest >>""" ;
[
2009-09-20 23:42:40 -04:00
"""USING: kernel namespaces vocabs.parser vocabs.prettyprint ;
IN: vocabs.prettyprint.tests"""
]
[ [ manifest-test-2 eval( -- ) ] with-string-writer ] unit-test
: manifest-test-3 ( -- string )
2009-09-20 23:42:40 -04:00
"""USING: kernel namespaces vocabs.parser vocabs.prettyprint ;
FROM: math => + - ;
QUALIFIED: system
QUALIFIED-WITH: assocs a
EXCLUDE: parser => run-file ;
IN: vocabs.prettyprint.tests
2009-09-20 23:42:40 -04:00
<< manifest get pprint-manifest >>""" ;
[
2009-09-20 23:42:40 -04:00
"""USING: kernel namespaces vocabs.parser vocabs.prettyprint ;
FROM: math => + - ;
QUALIFIED: system
QUALIFIED-WITH: assocs a
EXCLUDE: parser => run-file ;
2009-09-20 23:42:40 -04:00
IN: vocabs.prettyprint.tests"""
]
2009-09-20 23:42:40 -04:00
[ [ manifest-test-3 eval( -- ) ] with-string-writer ] unit-test