'Nother patch from Larry to fix a buglet in how the line gets sed-ified.

Also, more testcases and comments on bugs and formatting differences in some
of the testcases.
This commit is contained in:
Mark Whitley
2001-05-24 21:24:39 +00:00
parent fa43e54b6f
commit 0a4f578fdc
2 changed files with 23 additions and 4 deletions

View File

@@ -21,6 +21,10 @@
# - try to make the applet you're testing the first thing on the line (this # - try to make the applet you're testing the first thing on the line (this
# not always possible) # not always possible)
# - (???) if you have to create a temporary file, call it TMPFILE # - (???) if you have to create a temporary file, call it TMPFILE
# - pipe symbols that represent real pipes need a space in front of them
# (so the test script can find them and add the "../busybox" after it).
# - pipe symbols that are not used for pipes need to be shell-escaped,
# with a double \. See the expr test cases.
# ar # ar
@@ -60,11 +64,13 @@ date +%d/%m/%y
# dc - needs an input file # dc - needs an input file
# dd # dd
# BUG: record count line goes to stdout instead of stderr
dd if=/dev/urandom of=O bs=1k count=1 ; ls -l O ; rm O dd if=/dev/urandom of=O bs=1k count=1 ; ls -l O ; rm O
# deallocvt # deallocvt
# df # df
# XXX: minor formatting differences
df df
df . df .
df -k df -k
@@ -86,6 +92,7 @@ dmesg -s 512
# dpkg_deb # dpkg_deb
# du # du
# BUG: rounding behavior differs from GNU du
du du
du -s du -s
du -l du -l
@@ -141,6 +148,7 @@ expr 12 % 5
find . find .
# free # free
# XXX: minor formatting differences
free free
# freeramdisk # freeramdisk
@@ -158,9 +166,12 @@ grep -e strdup -e regcomp -e atexit ../grep.c
# gunzip # gunzip
# gzip # gzip
# XXX: compressed output differs from gzip-1.2.4, but decompresses fine
echo testing 1 2 3 >tmpfile1; gzip tmpfile1; echo tmpfile*; md5sum tmpfile1.gz; rm tmpfile1.gz echo testing 1 2 3 >tmpfile1; gzip tmpfile1; echo tmpfile*; md5sum tmpfile1.gz; rm tmpfile1.gz
echo testing 1 2 3 | gzip >tmpfile1.gz; md5sum tmpfile1.gz; rm tmpfile1.gz echo testing 1 2 3 | gzip >tmpfile1.gz; md5sum tmpfile1.gz; rm tmpfile1.gz
# halt
# halt - won't test, dangerous
# head # head
head tester.sh head tester.sh
@@ -170,6 +181,7 @@ head -n 2 tester.sh
hostid hostid
# hostname # hostname
# XXX: minor formatting differences
hostname hostname
hostname -s hostname -s
hostname -i hostname -i
@@ -178,6 +190,7 @@ hostname -d
#hostname -F #hostname -F
# id # id
# BUG: Busybox id doesn't print supplemental groups
id id
id -u id -u
id -g id -g
@@ -208,6 +221,7 @@ ifconfig
# logname # logname
# ls # ls
# XXX: minor formatting differences
ls ../e* ls ../e*
ls -l ../e* ls -l ../e*
ls -s ../e* ls -s ../e*
@@ -240,8 +254,9 @@ mkfifo -m 0600 F ; ls -l F ; rm F
# more - can't test: interactive # more - can't test: interactive
# mount # mount
# BUG: proc line starts with /proc instead of proc
mount mount
# not going to test any more # not going to test mount with any args, can't be done safely or sanely
# mt # mt
# mv - see mv_tests.mk # mv - see mv_tests.mk
@@ -274,6 +289,7 @@ touch F ; rm F
# rmmod - won't test: dangerous # rmmod - won't test: dangerous
# route # route
# XXX: doesn't DNS resolve
route route
# rpmunpack # rpmunpack
@@ -326,6 +342,7 @@ touch tmpfile1; ls tmpfile1; rm -f tmpfile1
touch -c tmpfile1; ls tmpfile1; rm -f tmpfile1 touch -c tmpfile1; ls tmpfile1; rm -f tmpfile1
# tr # tr
# BUG: Busybox tr range handling minix style [a-z] instead of GNU # style a-z
echo "cbaab" | tr abc zyx echo "cbaab" | tr abc zyx
echo "TESTING A B C" | tr [A-Z] [a-z] echo "TESTING A B C" | tr [A-Z] [a-z]
# not GNU compatible # not GNU compatible
@@ -347,6 +364,7 @@ false ; echo $?
# update # update
# uptime # uptime
# BUG: doesn't print number of users
uptime uptime
# usleep # usleep
@@ -370,6 +388,7 @@ which ls
whoami whoami
# xargs # xargs
# XXX: Busygox xargs divides filenames with '\n' instead of ' '
ls -1 ../e* | xargs ls -1 ../e* | xargs
ls -1 ../e* | xargs md5sum ls -1 ../e* | xargs md5sum

View File

@@ -124,8 +124,8 @@ do
# line=${line//;/; $BUSYBOX } # line=${line//;/; $BUSYBOX }
# line=${line//|/| $BUSYBOX } # line=${line//|/| $BUSYBOX }
# assume $BUSYBOX has no commas # assume $BUSYBOX has no commas
line=`echo $line | sed -e 's,;,; '$BUSYBOX, \ line=`echo "$line" | sed -e 's,;,; '$BUSYBOX, \
-e 's,|,| '$BUSYBOX,` -e 's, |, | '$BUSYBOX,`
# execute line using busybox programs # execute line using busybox programs
[ $DEBUG -ge 2 ] && echo "testing: $line" | tee -a $LOGFILE [ $DEBUG -ge 2 ] && echo "testing: $line" | tee -a $LOGFILE