Changeset 1765 in MondoRescue for branches/2.2.5/mindi-busybox/testsuite
- Timestamp:
- Nov 4, 2007, 3:16:40 AM (16 years ago)
- Location:
- branches/2.2.5/mindi-busybox/testsuite
- Files:
-
- 14 added
- 1 deleted
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mindi-busybox/testsuite/all_sourcecode.tests
r821 r1765 20 20 # applets won't be called properly. 21 21 # 22 sed -n -e '/^USE_[A-Z]*(APPLET (/{s:.*(::;s:,.*::;s:"::g;p}' \22 sed -n -e '/^USE_[A-Z]*(APPLET/{s:,.*::;s:.*(::;s:"::g;p}' \ 23 23 $srcdir/../include/applets.h > applet.order.current 24 24 LC_ALL=C sort applet.order.current > applet.order.correct … … 50 50 -e '\<deamon\>' \ 51 51 -e '\<derefernce\>' \ 52 -e '\<acomadate\>' \ 52 53 | sed -e "s:^$srcdir/\.\./::g" > src.typos 53 54 testing "Common typos" "cat src.typos" "" "" "" -
branches/2.2.5/mindi-busybox/testsuite/cp/cp-dir-create-dir
r821 r1765 1 mkdir bar 1 mkdir bar 2 2 touch bar/baz 3 busybox cp -R bar foo 4 test -f foo/baz 3 busybox cp -R bar foo 4 test -f foo/baz -
branches/2.2.5/mindi-busybox/testsuite/cp/cp-dir-existing-dir
r821 r1765 1 mkdir bar 1 mkdir bar 2 2 touch bar/baz 3 3 mkdir foo 4 busybox cp -R bar foo 5 test -f foo/bar/baz 4 busybox cp -R bar foo 5 test -f foo/bar/baz -
branches/2.2.5/mindi-busybox/testsuite/grep.tests
r821 r1765 5 5 # Licensed under GPL v2, see file LICENSE for details. 6 6 7 # AUDIT: 7 # AUDIT: 8 8 9 9 . testing.sh -
branches/2.2.5/mindi-busybox/testsuite/mount.testroot
r821 r1765 87 87 # Fun with mount -a 88 88 89 testing "mount -a no fstab" "mount -a 2>/dev/null || echo yes" "yes\n" "" "" 89 testing "mount -a no fstab" "mount -a 2>/dev/null || echo yes" "yes\n" "" "" 90 90 91 91 umount /proc -
branches/2.2.5/mindi-busybox/testsuite/pidof.tests
r821 r1765 5 5 # Licensed under GPL v2, see file LICENSE for details. 6 6 7 # AUDIT: 7 # AUDIT: 8 8 9 9 . testing.sh … … 25 25 testing "pidof -o %PPID" "pidof -o %PPID pidof.tests | grep -o -w $$" "" "" "" 26 26 testing "pidof -o %PPID NOP" "pidof -o %PPID -s init" "1\n" "" "" 27 testing "pidof -o init" "pidof -o 1 init | grep -o -w 1" "" "" "" 27 testing "pidof -o init" "pidof -o 1 init | grep -o -w 1" "" "" "" 28 28 29 29 exit $FAILCOUNT -
branches/2.2.5/mindi-busybox/testsuite/readlink.tests
r821 r1765 29 29 30 30 # clean up 31 rm -r "$TESTLINK" "$TESTDIR" 31 rm -r "$TESTLINK" "$TESTDIR" 32 32 -
branches/2.2.5/mindi-busybox/testsuite/runtest
r821 r1765 7 7 # Run old-style test. 8 8 9 function run_applet_testcase 9 run_applet_testcase() 10 10 { 11 11 local applet=$1 … … 56 56 } 57 57 58 run_applet_tests 58 run_applet_tests() 59 59 { 60 60 local applet=$1 … … 95 95 # Populate a directory with links to all busybox applets 96 96 97 LINKSDIR="${bindir}/runtest-tempdir-links" 97 LINKSDIR="$bindir/runtest-tempdir-links" 98 implemented=$($bindir/busybox 2>&1 | 99 while read line 100 do 101 if test x"$line" = x"Currently defined functions:" 102 then 103 xargs | sed 's/,//g' 104 break 105 fi 106 done 107 ) 98 108 rm -rf "$LINKSDIR" 2>/dev/null 99 109 mkdir "$LINKSDIR" 100 for i in $ (sed 's@/[a-z0-9/\[]*/@@' $bindir/busybox.links 2>/dev/null)110 for i in $implemented 101 111 do 102 112 ln -s $bindir/busybox "$LINKSDIR"/$i … … 128 138 fi 129 139 if PATH="$LINKSDIR":$srcdir:$bindir:$PATH \ 130 "${srcdir:-.}/$applet".tests140 "${srcdir:-.}/$applet".tests 131 141 then 132 142 : 133 143 else 134 144 status=1 135 145 fi 136 146 fi -
branches/2.2.5/mindi-busybox/testsuite/sed.tests
r902 r1765 117 117 "woo" "woo" 118 118 testing "sed empty file plus cat" "sed -e 's/nohit//' input -" "one\ntwo" \ 119 "" "one\ntwo" 119 "" "one\ntwo" 120 120 testing "sed cat plus empty file" "sed -e 's/nohit//' input -" "one\ntwo" \ 121 121 "one\ntwo" "" … … 139 139 testing "sed clusternewline" \ 140 140 "sed -e '/one/a 111' -e '/two/i 222' -e p input -" \ 141 "one\none\n111\n222\ntwo\ntwo" "one" "two" 141 "one\none\n111\n222\ntwo\ntwo" "one" "two" 142 testing "sed subst+write" \ 143 "sed -e 's/i/z/' -e 'woutputw' input -; echo -n X; cat outputw" \ 144 "thzngy\nagaznXthzngy\nagazn" "thingy" "again" 145 rm outputw 146 testing "sed trailing NUL" \ 147 "sed 's/i/z/' input -" \ 148 "a\0b\0\nc" "a\0b\0" "c" 149 testing "sed escaped newline in command" \ 150 "sed 's/a/z\\ 151 z/' input" \ 152 "z\nz" "a" "" 142 153 143 154 # Test end-of-file matching behavior … … 147 158 testing "sed match EOF two files" "sed -e '"'$p'"' input -" \ 148 159 "one\ntwo\nthree\nfour\nfour" "one\ntwo" "three\nfour" 160 # sed match EOF inline: gnu sed 4.1.5 outputs this: 161 #00000000 6f 6e 65 0a 6f 6f 6b 0a 6f 6f 6b 0a 74 77 6f 0a |one.ook.ook.two.| 162 #00000010 0a 74 68 72 65 65 0a 6f 6f 6b 0a 6f 6f 6b 0a 66 |.three.ook.ook.f| 163 #00000020 6f 75 72 |our| 164 # which looks buggy to me. 149 165 echo -ne "three\nfour" > input2 150 166 testing "sed match EOF inline" \ -
branches/2.2.5/mindi-busybox/testsuite/sort.tests
r821 r1765 57 57 " "$data" "" 58 58 59 # 59 # 60 60 61 61 testing "sort key range with multiple options" "sort -k2,3rn input" \ … … 67 67 " "$data" "" 68 68 69 testing "sort key range with two -k options" "sort -k 2,2n -k 1,1r input" "\ 70 d 2 71 b 2 72 c 3 73 " "\ 74 c 3 75 b 2 76 d 2 77 " "" 78 79 testing "sort with non-default leading delim 1" "sort -n -k2 -t/ input" "\ 80 /a/2 81 /b/1 82 " "\ 83 /a/2 84 /b/1 85 " "" 86 87 testing "sort with non-default leading delim 2" "sort -n -k3 -t/ input" "\ 88 /b/1 89 /a/2 90 " "\ 91 /b/1 92 /a/2 93 " "" 94 95 testing "sort with non-default leading delim 3" "sort -n -k3 -t/ input" "\ 96 //a/2 97 //b/1 98 " "\ 99 //a/2 100 //b/1 101 " "" 102 103 testing "sort -u should consider field only when discarding" "sort -u -k2 input" "\ 104 a c 105 " "\ 106 a c 107 b c 108 " "" 109 69 110 testing "sort key doesn't strip leading blanks, disables fallback global sort" \ 70 "sort -n -k2 -t ' '" " a \n 1 \n 2 \n" "" " 2 \n 1 \n a \n" 71 72 testing "sort key edge case with -t" "sort -n -k4 -t/" \ 73 "/usr/lib/finish-install.d/1 74 /usr/lib/finish-install.d/4 75 /usr/lib/prebaseconfig.d/2 76 /usr/lib/prebaseconfig.d/6 77 " "" "/usr/lib/finish-install.d/1 78 /usr/lib/prebaseconfig.d/2 79 /usr/lib/finish-install.d/4 80 /usr/lib/prebaseconfig.d/6 81 " 111 "sort -n -k2 -t ' '" " a \n 1 \n 2 \n" "" " 2 \n 1 \n a \n" 82 112 83 113 exit $FAILCOUNT -
branches/2.2.5/mindi-busybox/testsuite/testing.sh
r821 r1765 52 52 # The testing function 53 53 54 testing 54 testing() 55 55 { 56 56 NAME="$1" … … 77 77 RETVAL=$? 78 78 79 cmp expected actual > /dev/null79 cmp expected actual >/dev/null 2>/dev/null 80 80 if [ $? -ne 0 ] 81 81 then … … 98 98 # are copied. 99 99 100 function mkchroot 100 mkchroot() 101 101 { 102 102 [ $# -lt 2 ] && return … … 127 127 # Script fed to stdin. 128 128 129 function dochroot 129 dochroot() 130 130 { 131 131 mkdir tmpdir4chroot -
branches/2.2.5/mindi-busybox/testsuite/tr/tr-d-works
r821 r1765 2 2 echo testing | busybox tr -d aeiou > logfile.bb 3 3 4 cmplogfile.gnu logfile.bb4 diff -u logfile.gnu logfile.bb -
branches/2.2.5/mindi-busybox/testsuite/tr/tr-works
r821 r1765 8 8 { 9 9 run_tr "cbaab" abc zyx 10 run_tr "TESTING A B C" '[A-Z]' '[a-z]' 10 run_tr "TESTING A B C" '[A-Z]' '[a-z]' 11 11 run_tr "abc[]" "a[b" AXB 12 12 run_tr abc '[:alpha:]' A-ZA-Z … … 18 18 run_tr 'a b' '[= =]' X 19 19 run_tr "[:" '[:' ab 20 run_tr " .,:" '[:punct:]' 12 21 run_tr " .,:" '[:cntrl:]' 12 20 22 } 21 23 22 24 bb= tr_test > logfile.gnu 23 25 bb=busybox tr_test > logfile.bb 24 cmplogfile.gnu logfile.bb26 diff -u logfile.gnu logfile.bb -
branches/2.2.5/mindi-busybox/testsuite/uniq.tests
r821 r1765 41 41 #-c occurrences 42 42 #-d dups only 43 #-u 43 #-u 44 44 45 45 # Test various command line options -
branches/2.2.5/mindi-busybox/testsuite/wc/wc-counts-all
r821 r1765 1 test "`echo i\'m a little teapot | busybox wc`" = ' 1 4 20' 1 # 1 line, 4 words, 20 chars. 2 test "`echo i\'m a little teapot | busybox wc | sed 's/ */ /g' | sed 's/^ //'`" = '1 4 20'
Note:
See TracChangeset
for help on using the changeset viewer.