check that a thread owns no resources when changing its id
[nobug.git] / tests / 00test.tests
blob6e353e2d51c57185ad9854b679937e04015af737
1 TESTING "test system selftest" /bin/cat
3 TEST "test cat'ing stdin to stdout" <<END
4 in: foo: bar
5 out: foo: bar
6 return: 0
7 END
9 TEST "test stderr, cat'ing noonexistant file" ,nonexistent_file <<END
10 err: /bin/cat: ,nonexistent_file: No such file or directory
11 return: 1
12 END
14 TESTING "test system features" shtest
16 function shtest()
18     cat <<EOF
19 always
20 true
21 next
22 false
23 true
24 done
25 EOF
29 TEST "shell function test" <<END
30 out: always
31 out: true
32 out: next
33 out: false
34 out: true
35 out: done
36 END
38 TEST "conditional test" shtest <<END
39 #comment
41 out: always
43 if: true
44  out: true
45 else:
46  out: notreached
47 endif:
49 out: next
51 if: false
52  out: notreached
53 else:
54  out: false
55  if: true
56   out: true
57  else:
58   out: notreached
59  endif:
60 endif:
62 out: done
63 END
66 TEST "conditional test, elseif" shtest <<END
67 #comment
69 out: always
71 if: true
72  out: true
73 elseif: true
74  out: notreached
75 else:
76  out: notreached
77 endif:
79 out: next
81 if: false
82  out: notreached
83 elseif: false
84  out: notreached
85 elseif: true
86  out: false
87  if: false
88   out: notreached
89  elseif: true
90   out: true
91  elseif: false
92   out: notreached
93  endif:
94 else:
95  out: notreached
96 endif:
98 out: done
99 END
102 TESTING "test match functions" matchtest
104 function matchtest()
106     cat <<EOF
107 start
108 ( [ ] )
113 TEST "literal matches" <<END
114 out: start
115 out-lit: ( [ ] )
116 out: end