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 "1234" | cut -c 1
47 echo "1234567890" | cut -c2-7
48 echo "1234567890" | cut -c 2-7
49 echo "f1 f2" | cut -f2
50 echo "f1 f2" | cut -f 2
51 echo "f1 f2 f3 f4 f5" | cut -f2-4
52 echo "f1 f2 f3 f4 f5" | cut -f 2-4
60 # dc - needs an input file
63 dd if=/dev/urandom of=O bs=1k count=1 ; ls -l O ; rm O
77 # dmesg (XXX: change the silly cmd business in the source)
81 # I really don't want to do this next one
84 # dos2unix - needs an input file
96 # dumpkmap - no counterprt?
97 # dutmp - no counterprt?
105 # XXX: something's wrong with the way I'm doing these. Figure it out later.
136 # somebody else can do all the string stuff
139 # fbset - can't be tested here
148 # fsck.minix - won't test
167 # not going to do this next one
185 # insmod - won't test
189 # not going to do any more
215 mkdir D ; ls -ld D ; rmdir D
219 # we will test making one. actually testing pushing data through it requires
220 # more interaction than we can manage here.
221 # (these lines turn up an existing ls bug)
222 mkfifo F ; ls -l F ; rm F
223 mkfifo -m 0600 F ; ls -l F ; rm F
225 # mkfs.minix - won't test
227 # mkswap - won't test
229 # more - can't test: interactive
233 # not going to test any more
242 # poweroff - won't test
244 # ps - there's lotsa differences between busybox ps and any other ps
252 ln -sf tester.sh L ; readlink L ; rm -f L
254 # reboot - won't test
255 # renice - won't test
256 # reset - can't test: no output
262 # rmmod - won't test: dangerous
265 # sed - we can do some one-liners here; probably needs it's own input file
268 # sh - note that we cannot test the shell interactively here
273 # sleep - can't test: produces no output
281 # swapon - won't test: dangerous
282 # swapoff - won't test: dangerous
283 # sync - can't test: no output
284 # syslogd - won't test: too involved
293 echo "please tee me!" | tee A B C ; cat A B C
294 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
296 # telnet - can't test: interactive
336 ls -1 ../e* | xargs md5sum
338 # yes - can't test: interactive (needs ^C)