]> gitweb.factorcode.org Git - factor.git/blob - extra/mason/child/child-tests.factor
more test IN: cleanup.
[factor.git] / extra / mason / child / child-tests.factor
1 USING: io io.pathnames kernel mason.child mason.config
2 namespaces sequences system tools.test ;
3
4 { t } [
5     H{
6         { target-os windows }
7         { target-cpu x86.32 }
8     } [ mason-child-boot-cmd ] with-variables first absolute-path?
9 ] unit-test
10
11 [ [ "Hi" print ] [ drop 3 ] [ 4 ] recover-else ] must-infer
12
13 { 4 } [ [ "Hi" print ] [ drop 3 ] [ 4 ] recover-else ] unit-test
14
15 { 3 } [ [ "Hi" throw ] [ drop 3 ] [ 4 ] recover-else ] unit-test
16
17 { "A" } [
18     {
19         { [ 3 throw ] [ { "X" "Y" "Z" "A" } nth ] }
20         [ "B" ]
21     } recover-cond
22 ] unit-test
23
24 { "B" } [
25     {
26         { [ ] [ ] }
27         [ "B" ]
28     } recover-cond
29 ] unit-test