diff options
author | Mark Whitley <markw@lineo.com> | 2001-03-10 00:51:29 +0000 |
---|---|---|
committer | Mark Whitley <markw@lineo.com> | 2001-03-10 00:51:29 +0000 |
commit | d2117e9c828e02bfc1da38768fc3f6198cab9340 (patch) | |
tree | 37469d39aa87f07a02cbc72ae4b166ed34826fc0 /tests/testcases | |
parent | 09f4af5afd12569fd813ae4701f6936fd5712553 (diff) | |
download | busybox-w32-d2117e9c828e02bfc1da38768fc3f6198cab9340.tar.gz busybox-w32-d2117e9c828e02bfc1da38768fc3f6198cab9340.tar.bz2 busybox-w32-d2117e9c828e02bfc1da38768fc3f6198cab9340.zip |
Created new regression testing framework with a number of testcases (many more
can be added). Also changed 'test' target in makefile to run the new
tester.sh. (Hopefully, we should be able to remove all the tests/*.mk files
soon.)
Diffstat (limited to 'tests/testcases')
-rw-r--r-- | tests/testcases | 301 |
1 files changed, 301 insertions, 0 deletions
diff --git a/tests/testcases b/tests/testcases new file mode 100644 index 000000000..1838fa0fc --- /dev/null +++ b/tests/testcases | |||
@@ -0,0 +1,301 @@ | |||
1 | # testcases | ||
2 | # | ||
3 | # This file should be filled with test cases to test applets that: | ||
4 | # | ||
5 | # - can somehow produce output (we can't test sync or sleep) | ||
6 | # - have a GNU (or other) counterpart | ||
7 | # - are not interactive (don't require a ^C or anything) | ||
8 | # - don't require extensive setup or cleanup (a litte setup is fine) | ||
9 | # - don't have huge and possibly damaging effects (fsck, swapoff) | ||
10 | # | ||
11 | # If possible, a test case should be made that tests each option the applet | ||
12 | # supports. When a new option is added, a new test case should be written for | ||
13 | # it. When somebody reports a bug with a testcase, that testcase should be | ||
14 | # added here as well. | ||
15 | # | ||
16 | # Some other guidelines to follow: | ||
17 | # | ||
18 | # - please try to keep applets alphabetized, it will make life easier | ||
19 | # - use the file tester.sh or testcases when you need to do a non-destructive | ||
20 | # test on a file (i.e. cat, md5sum) | ||
21 | # - try to make the applet you're testing the first thing on the line (this | ||
22 | # not always possible) | ||
23 | # - (???) if you have to create a temporary file, call it TMPFILE | ||
24 | |||
25 | |||
26 | # ar | ||
27 | |||
28 | # basename | ||
29 | basename `pwd` | ||
30 | |||
31 | # cat | ||
32 | cat tester.sh | ||
33 | |||
34 | # chmod | ||
35 | # chown | ||
36 | # chgrp | ||
37 | # chroot | ||
38 | # chvt - can't be tested here | ||
39 | # clear - can't be tested here | ||
40 | # cmp | ||
41 | # cp | ||
42 | # mv | ||
43 | |||
44 | # cut | ||
45 | echo "1234" | cut -c1 | ||
46 | echo "f1 f2" | cut -f2 | ||
47 | |||
48 | # date | ||
49 | date | ||
50 | date -R | ||
51 | date -u | ||
52 | date +%d/%m/%y | ||
53 | |||
54 | # dc - needs an input file | ||
55 | # dd | ||
56 | # deallocvt | ||
57 | |||
58 | # df | ||
59 | df | ||
60 | df . | ||
61 | df -k | ||
62 | df -h | ||
63 | df -m | ||
64 | |||
65 | # dirname | ||
66 | dirname `pwd` | ||
67 | |||
68 | # dmesg (XXX: change the silly cmd business in the source) | ||
69 | dmesg | ||
70 | dmesg -n 8 | ||
71 | dmesg -s 512 | ||
72 | # I really don't want to do this next one | ||
73 | #dmesg -c | ||
74 | |||
75 | # dos2unix - needs an input file | ||
76 | # dpkg | ||
77 | # dpkg_deb | ||
78 | |||
79 | # du | ||
80 | du | ||
81 | du -s | ||
82 | du -l | ||
83 | du -k | ||
84 | du -h | ||
85 | du -m | ||
86 | |||
87 | # dumpkmap - no counterprt? | ||
88 | # dutmp - no counterprt? | ||
89 | |||
90 | # echo | ||
91 | echo "foo bar baz" | ||
92 | echo -n "no newline" | ||
93 | |||
94 | |||
95 | # expr | ||
96 | expr 1 \| 1 | ||
97 | expr 1 \| 0 | ||
98 | expr 0 \| 1 | ||
99 | expr 0 \| 0 | ||
100 | |||
101 | expr 1 \& 1 | ||
102 | expr 1 \& 0 | ||
103 | expr 0 \& 1 | ||
104 | expr 0 \& 0 | ||
105 | |||
106 | expr 0 \< 1 | ||
107 | expr 1 \< 0 | ||
108 | |||
109 | expr 1 \> 0 | ||
110 | expr 0 \> 1 | ||
111 | |||
112 | expr 0 \<= 1 | ||
113 | expr 1 \<= 0 | ||
114 | expr 1 \<= 1 | ||
115 | |||
116 | expr 1 \>= 0 | ||
117 | expr 0 \>= 1 | ||
118 | expr 1 \>= 1 | ||
119 | |||
120 | expr 1 + 2 | ||
121 | expr 2 - 1 | ||
122 | expr 2 \* 3 | ||
123 | expr 12 / 2 | ||
124 | expr 12 % 5 | ||
125 | |||
126 | # somebody else can do all the string stuff | ||
127 | |||
128 | |||
129 | # fbset - can't be tested here | ||
130 | # fdflush | ||
131 | # find | ||
132 | find . | ||
133 | |||
134 | # free | ||
135 | free | ||
136 | |||
137 | # freeramdisk | ||
138 | # fsck.minix - won't test | ||
139 | # getopt | ||
140 | # grep | ||
141 | # gunzip | ||
142 | # gzip | ||
143 | # halt | ||
144 | |||
145 | # head | ||
146 | head tester.sh | ||
147 | head -n 2 tester.sh | ||
148 | |||
149 | # hostid | ||
150 | hostid | ||
151 | |||
152 | # hostname | ||
153 | hostname | ||
154 | hostname -s | ||
155 | hostname -i | ||
156 | hostname -d | ||
157 | # not going to do this next one | ||
158 | #hostname -F | ||
159 | |||
160 | # id | ||
161 | id | ||
162 | id -u | ||
163 | id -g | ||
164 | id -ur | ||
165 | id -un | ||
166 | |||
167 | |||
168 | # ifconfig | ||
169 | #ifconfig | ||
170 | #ifconfig eth0 | ||
171 | #ifconfig lo | ||
172 | |||
173 | # init - won't test | ||
174 | # insmod - won't test | ||
175 | |||
176 | # kill | ||
177 | #kill -l | ||
178 | # not going to do any more | ||
179 | |||
180 | # length | ||
181 | # ln | ||
182 | # loadacm | ||
183 | # loadfont | ||
184 | # loadkmap | ||
185 | # logger | ||
186 | # logname | ||
187 | # ls | ||
188 | ls | ||
189 | ls -l | ||
190 | ls -s | ||
191 | ls -h | ||
192 | ls -1 | ||
193 | |||
194 | # lsmod | ||
195 | lsmod | ||
196 | |||
197 | # makedevs | ||
198 | |||
199 | # md5sum | ||
200 | md5sum tester.sh | ||
201 | |||
202 | # mkdir | ||
203 | # mkfifo | ||
204 | # mkfs.minix - won't test | ||
205 | # mknod | ||
206 | # mkswap - won't test | ||
207 | # mktemp | ||
208 | # more - can't test: interactive | ||
209 | |||
210 | # mount | ||
211 | mount | ||
212 | # not going to test any more | ||
213 | |||
214 | # mt | ||
215 | # nc | ||
216 | # nfsmount | ||
217 | # nslookup | ||
218 | # ping - can't test: interactive (needs ^C) | ||
219 | # pivot_root | ||
220 | # poweroff - won't test | ||
221 | # printf | ||
222 | # ps - there's lotsa differences between busybox ps and any other ps | ||
223 | |||
224 | # pwd | ||
225 | pwd | ||
226 | |||
227 | # rdate - won't test | ||
228 | |||
229 | # readlink | ||
230 | ln -sf tester.sh LINKFILE | ||
231 | readlink LINKFILE | ||
232 | rm -f LINKFILE | ||
233 | |||
234 | # reboot - won't test | ||
235 | # renice - won't test | ||
236 | # reset - can't test: no output | ||
237 | # rm | ||
238 | # rmdir | ||
239 | # rmmod - won't test: dangerous | ||
240 | # route | ||
241 | # rpmunpack | ||
242 | # sed - we can do some one-liners here; probably needs it's own input file | ||
243 | # setkeycodes | ||
244 | # sh - this should probably have it's own testcase or input file | ||
245 | # sleep - can't test: produces no output | ||
246 | # sort | ||
247 | # stty | ||
248 | # swapon - won't test: dangerous | ||
249 | # swapoff - won't test: dangerous | ||
250 | # sync - can't test: no output | ||
251 | # syslogd | ||
252 | |||
253 | # tail | ||
254 | tail tester.sh | ||
255 | tail -n 2 tester.sh | ||
256 | |||
257 | # tar | ||
258 | # tee | ||
259 | # telnet | ||
260 | # test | ||
261 | # tftp | ||
262 | # touch | ||
263 | # tr | ||
264 | true ; echo $? | ||
265 | false ; echo $? | ||
266 | # tty | ||
267 | # umount | ||
268 | # uname | ||
269 | # uniq | ||
270 | # unix2dos | ||
271 | # update | ||
272 | |||
273 | uptime | ||
274 | |||
275 | # usleep | ||
276 | # uudecode | ||
277 | # uuencode | ||
278 | # watchdog | ||
279 | |||
280 | # wc | ||
281 | wc tester.sh | ||
282 | wc -c tester.sh | ||
283 | wc -w tester.sh | ||
284 | wc -l tester.sh | ||
285 | wc -L tester.sh | ||
286 | |||
287 | # wget | ||
288 | |||
289 | # which | ||
290 | which ls | ||
291 | |||
292 | # whoami | ||
293 | whoami | ||
294 | |||
295 | # xargs | ||
296 | # (for some reason, the > redirection isn't working) | ||
297 | #ls -1 > TMPFILE | ||
298 | #xargs md5sum < TMPFILE | ||
299 | #rm -f TMPFILE | ||
300 | |||
301 | # yes - can't test: interactive (needs ^C) | ||