diff options
author | Mark Whitley <markw@lineo.com> | 2001-05-24 17:15:33 +0000 |
---|---|---|
committer | Mark Whitley <markw@lineo.com> | 2001-05-24 17:15:33 +0000 |
commit | 04052f96e1385405787356f0955afadd73d8f029 (patch) | |
tree | 1a95bdf6e1e21bb031b872d032ba2ca0d0664757 /tests/testcases | |
parent | a813afc24f864e0055bdd0ef8cde6777a514b212 (diff) | |
download | busybox-w32-04052f96e1385405787356f0955afadd73d8f029.tar.gz busybox-w32-04052f96e1385405787356f0955afadd73d8f029.tar.bz2 busybox-w32-04052f96e1385405787356f0955afadd73d8f029.zip |
Numerous new testcases from Larry Doolittle and a patch to tester.sh to avoid
a bash2-ism and quote variables that contain strings.
Diffstat (limited to 'tests/testcases')
-rw-r--r-- | tests/testcases | 90 |
1 files changed, 57 insertions, 33 deletions
diff --git a/tests/testcases b/tests/testcases index 24d491c5b..8f4e14765 100644 --- a/tests/testcases +++ b/tests/testcases | |||
@@ -30,6 +30,7 @@ basename `pwd` | |||
30 | 30 | ||
31 | # cat | 31 | # cat |
32 | cat tester.sh | 32 | cat tester.sh |
33 | echo hello there | cat tester.sh - | ||
33 | 34 | ||
34 | # chmod | 35 | # chmod |
35 | # chown | 36 | # chown |
@@ -39,7 +40,6 @@ cat tester.sh | |||
39 | # clear - can't be tested here | 40 | # clear - can't be tested here |
40 | # cmp | 41 | # cmp |
41 | # cp | 42 | # cp |
42 | # mv | ||
43 | 43 | ||
44 | # cut | 44 | # cut |
45 | echo "1234" | cut -c1 | 45 | echo "1234" | cut -c1 |
@@ -102,36 +102,35 @@ echo -n "no newline" | |||
102 | 102 | ||
103 | 103 | ||
104 | # expr | 104 | # expr |
105 | # XXX: something's wrong with the way I'm doing these. Figure it out later. | 105 | expr 1 \\| 1 |
106 | #expr 1 \| 1 | 106 | expr 1 \\| 0 |
107 | #expr 1 \| 0 | 107 | expr 0 \\| 1 |
108 | #expr 0 \| 1 | 108 | expr 0 \\| 0 |
109 | #expr 0 \| 0 | 109 | |
110 | # | 110 | expr 1 \\& 1 |
111 | #expr 1 \& 1 | 111 | expr 1 \\& 0 |
112 | #expr 1 \& 0 | 112 | expr 0 \\& 1 |
113 | #expr 0 \& 1 | 113 | expr 0 \\& 0 |
114 | #expr 0 \& 0 | 114 | |
115 | # | 115 | expr 0 \\< 1 |
116 | #expr 0 \< 1 | 116 | expr 1 \\< 0 |
117 | #expr 1 \< 0 | 117 | |
118 | # | 118 | expr 1 \\> 0 |
119 | #expr 1 \> 0 | 119 | expr 0 \\> 1 |
120 | #expr 0 \> 1 | 120 | |
121 | # | 121 | expr 0 \\<= 1 |
122 | #expr 0 \<= 1 | 122 | expr 1 \\<= 0 |
123 | #expr 1 \<= 0 | 123 | expr 1 \\<= 1 |
124 | #expr 1 \<= 1 | 124 | |
125 | # | 125 | expr 1 \\>= 0 |
126 | #expr 1 \>= 0 | 126 | expr 0 \\>= 1 |
127 | #expr 0 \>= 1 | 127 | expr 1 \\>= 1 |
128 | #expr 1 \>= 1 | 128 | |
129 | # | 129 | expr 1 + 2 |
130 | #expr 1 + 2 | 130 | expr 2 - 1 |
131 | #expr 2 - 1 | 131 | expr 2 \\* 3 |
132 | #expr 2 \* 3 | 132 | expr 12 / 2 |
133 | #expr 12 / 2 | 133 | expr 12 % 5 |
134 | #expr 12 % 5 | ||
135 | 134 | ||
136 | # somebody else can do all the string stuff | 135 | # somebody else can do all the string stuff |
137 | 136 | ||
@@ -156,7 +155,10 @@ grep -lc strdup ../*.c | |||
156 | grep -cv strdup ../*.c | 155 | grep -cv strdup ../*.c |
157 | 156 | ||
158 | # gunzip | 157 | # gunzip |
158 | |||
159 | # gzip | 159 | # gzip |
160 | echo testing 1 2 3 >tmpfile1; gzip tmpfile1; echo tmpfile*; md5sum tmpfile1.gz; rm tmpfile1.gz | ||
161 | echo testing 1 2 3 | gzip >tmpfile1.gz; md5sum tmpfile1.gz; rm tmpfile1.gz | ||
160 | # halt | 162 | # halt |
161 | 163 | ||
162 | # head | 164 | # head |
@@ -183,7 +185,8 @@ id -un | |||
183 | 185 | ||
184 | 186 | ||
185 | # ifconfig | 187 | # ifconfig |
186 | #ifconfig | 188 | # requires BB_FEATURE_IFCONFIG_STATUS |
189 | ifconfig | ||
187 | #ifconfig -a | 190 | #ifconfig -a |
188 | #ifconfig eth0 | 191 | #ifconfig eth0 |
189 | #ifconfig lo | 192 | #ifconfig lo |
@@ -196,7 +199,7 @@ id -un | |||
196 | # not going to do any more | 199 | # not going to do any more |
197 | 200 | ||
198 | # length | 201 | # length |
199 | # ln | 202 | # ln - see ln_tests.mk |
200 | # loadacm | 203 | # loadacm |
201 | # loadfont | 204 | # loadfont |
202 | # loadkmap | 205 | # loadkmap |
@@ -240,6 +243,7 @@ mount | |||
240 | # not going to test any more | 243 | # not going to test any more |
241 | 244 | ||
242 | # mt | 245 | # mt |
246 | # mv - see mv_tests.mk | ||
243 | # nc | 247 | # nc |
244 | # nfsmount | 248 | # nfsmount |
245 | # nslookup | 249 | # nslookup |
@@ -267,7 +271,10 @@ touch F ; rm F | |||
267 | 271 | ||
268 | # rmdir | 272 | # rmdir |
269 | # rmmod - won't test: dangerous | 273 | # rmmod - won't test: dangerous |
274 | |||
270 | # route | 275 | # route |
276 | route | ||
277 | |||
271 | # rpmunpack | 278 | # rpmunpack |
272 | 279 | ||
273 | # sed - we can do some one-liners here; probably needs it's own input file | 280 | # sed - we can do some one-liners here; probably needs it's own input file |
@@ -282,6 +289,8 @@ sed -e '/test/s/dangerous/PELIGROSO/' testcases | |||
282 | sh -c "echo a b c" | 289 | sh -c "echo a b c" |
283 | sh -c ">" | 290 | sh -c ">" |
284 | sh -c "a" | 291 | sh -c "a" |
292 | #sh sh.testcases | ||
293 | |||
285 | 294 | ||
286 | # sleep - can't test: produces no output | 295 | # sleep - can't test: produces no output |
287 | 296 | ||
@@ -310,10 +319,25 @@ echo "please tee me!" | tee A B C ; echo "tee me too!" | tee -a A B C ; cat A B | |||
310 | 319 | ||
311 | # test | 320 | # test |
312 | # tftp | 321 | # tftp |
322 | |||
313 | # touch | 323 | # touch |
324 | touch tmpfile1; ls tmpfile1; rm -f tmpfile1 | ||
325 | touch -c tmpfile1; ls tmpfile1; rm -f tmpfile1 | ||
326 | |||
314 | # tr | 327 | # tr |
328 | echo "cbaab" | tr abc zyx | ||
329 | echo "TESTING A B C" | tr [A-Z] [a-z] | ||
330 | # not GNU compatible | ||
331 | echo fdhrnzvfu bffvsentr | tr [a-z] [n-z][a-m] | ||
332 | echo abc[] | tr a[b AXB | ||
333 | echo testing | tr -d aeiou | ||
334 | |||
335 | # true | ||
315 | true ; echo $? | 336 | true ; echo $? |
337 | |||
338 | # false | ||
316 | false ; echo $? | 339 | false ; echo $? |
340 | |||
317 | # tty | 341 | # tty |
318 | # umount | 342 | # umount |
319 | # uname | 343 | # uname |