3 # This file should be filled with test cases to test applets that:
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)
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
16 # Some other guidelines to follow:
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
38 # chvt - can't be tested here
39 # clear - can't be tested here
46 echo "f1 f2" | cut -f2
54 # dc - needs an input file
57 dd if=/dev/urandom of=O bs=1k count=1 ; ls -l O ; rm O
71 # dmesg (XXX: change the silly cmd business in the source)
75 # I really don't want to do this next one
78 # dos2unix - needs an input file
90 # dumpkmap - no counterprt?
91 # dutmp - no counterprt?
99 # XXX: something's wrong with the way I'm doing these. Figure it out later.
130 # somebody else can do all the string stuff
133 # fbset - can't be tested here
142 # fsck.minix - won't test
161 # not going to do this next one
179 # insmod - won't test
183 # not going to do any more
209 mkdir D ; ls -ld D ; rmdir D
213 # we will test making one. actually testing pushing data through it requires
214 # more interaction than we can manage here.
215 # (these lines turn up an existing ls bug)
216 mkfifo F ; ls -l F ; rm F
217 mkfifo -m 0600 F ; ls -l F ; rm F
219 # mkfs.minix - won't test
221 # mkswap - won't test
223 # more - can't test: interactive
227 # not going to test any more
236 # poweroff - won't test
238 # ps - there's lotsa differences between busybox ps and any other ps
246 ln -sf tester.sh L ; readlink L ; rm -f L
248 # reboot - won't test
249 # renice - won't test
250 # reset - can't test: no output
256 # rmmod - won't test: dangerous
259 # sed - we can do some one-liners here; probably needs it's own input file
262 # sh - note that we cannot test the shell interactively here
267 # sleep - can't test: produces no output
275 # swapon - won't test: dangerous
276 # swapoff - won't test: dangerous
277 # sync - can't test: no output
278 # syslogd - won't test: too involved
287 echo "please tee me!" | tee A B C ; cat A B C
288 echo "please tee me!" | tee A B C ; echo "tee me too!" | tee -a A B C ; cat A B C ; rm A B C
290 # telnet - can't test: interactive
330 ls -1 ../e* | xargs md5sum
332 # yes - can't test: interactive (needs ^C)