]> gitweb.factorcode.org Git - factor.git/blob - extra/mason/common/common-tests.factor
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
[factor.git] / extra / mason / common / common-tests.factor
1 IN: mason.common.tests
2 USING: prettyprint mason.common mason.config
3 namespaces calendar tools.test io.files
4 io.files.temp io.encodings.utf8 sequences ;
5
6 { "00:01:02" } [ 62,000,000,000 nanos>time ] unit-test
7
8 { t } [
9     [
10         "/home/bobby/builds" builds-dir set
11         T{ timestamp
12             { year 2008 }
13             { month 9 }
14             { day 11 }
15             { hour 12 }
16             { minute 23 }
17         } datestamp stamp set
18         build-dir
19     ] with-scope
20     "/home/bobby/builds/2008-09-11-12-23" head?
21 ] unit-test
22
23 { } [ "empty-test" temp-file utf8 [ ] with-file-writer ] unit-test
24
25 [ "empty-test" temp-file eval-file ] must-fail
26
27 { } [ "eval-file-test" temp-file utf8 [ { 1 2 3 } . ] with-file-writer ] unit-test
28
29 { { 1 2 3 } } [ "eval-file-test" temp-file eval-file ] unit-test