]> gitweb.factorcode.org Git - factor.git/blob - extra/mason/child/child-tests.factor
f2e99714ab6e2caebcdea226970d148899d49a59
[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 IN: mason.child.tests
4
5 { t } [
6     H{
7         { target-os windows }
8         { target-cpu x86.32 }
9     } [ mason-child-boot-cmd ] with-variables first absolute-path?
10 ] unit-test
11
12 [ [ "Hi" print ] [ drop 3 ] [ 4 ] recover-else ] must-infer
13
14 { 4 } [ [ "Hi" print ] [ drop 3 ] [ 4 ] recover-else ] unit-test
15
16 { 3 } [ [ "Hi" throw ] [ drop 3 ] [ 4 ] recover-else ] unit-test
17
18 { "A" } [
19     {
20         { [ 3 throw ] [ { "X" "Y" "Z" "A" } nth ] }
21         [ "B" ]
22     } recover-cond
23 ] unit-test
24
25 { "B" } [
26     {
27         { [ ] [ ] }
28         [ "B" ]
29     } recover-cond
30 ] unit-test