factor/extra/mason/common/common-tests.factor

28 lines
779 B
Factor
Raw Permalink Normal View History

2018-02-15 11:45:08 -05:00
USING: prettyprint mason.common mason.config namespaces calendar
tools.test io.files io.files.temp io.encodings.utf8 sequences ;
2008-09-16 00:20:33 -04:00
{ "00:01:02" } [ 62,000,000,000 nanos>time ] unit-test
2008-09-16 00:20:33 -04:00
{ t } [
2008-09-16 00:20:33 -04:00
[
"/home/bobby/builds" builds-dir set
T{ timestamp
{ year 2008 }
{ month 9 }
{ day 11 }
{ hour 12 }
{ minute 23 }
} datestamp stamp set
build-dir
] with-scope
2010-06-13 23:39:31 -04:00
"/home/bobby/builds/2008-09-11-12-23" head?
2008-09-16 00:20:33 -04:00
] unit-test
{ } [ "empty-test" temp-file utf8 [ ] with-file-writer ] unit-test
2008-09-16 00:20:33 -04:00
[ "empty-test" temp-file eval-file ] must-fail
{ } [ "eval-file-test" temp-file utf8 [ { 1 2 3 } . ] with-file-writer ] unit-test
2008-09-16 00:20:33 -04:00
{ { 1 2 3 } } [ "eval-file-test" temp-file eval-file ] unit-test