Changeset 1765 in MondoRescue for branches/2.2.5/mindi-busybox/testsuite


Ignore:
Timestamp:
Nov 4, 2007, 3:16:40 AM (16 years ago)
Author:
Bruno Cornec
Message:

Update to busybox 1.7.2

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  
    2020# applets won't be called properly.
    2121#
    22 sed -n -e '/^USE_[A-Z]*(APPLET(/{s:.*(::;s:,.*::;s:"::g;p}' \
     22sed -n -e '/^USE_[A-Z]*(APPLET/{s:,.*::;s:.*(::;s:"::g;p}' \
    2323    $srcdir/../include/applets.h > applet.order.current
    2424LC_ALL=C sort applet.order.current > applet.order.correct
     
    5050        -e '\<deamon\>' \
    5151        -e '\<derefernce\>' \
     52        -e '\<acomadate\>' \
    5253        | sed -e "s:^$srcdir/\.\./::g" > src.typos
    5354testing "Common typos" "cat src.typos" "" "" ""
  • branches/2.2.5/mindi-busybox/testsuite/cp/cp-dir-create-dir

    r821 r1765  
    1 mkdir bar 
     1mkdir bar
    22touch bar/baz
    3 busybox cp -R bar foo 
    4 test -f foo/baz 
     3busybox cp -R bar foo
     4test -f foo/baz
  • branches/2.2.5/mindi-busybox/testsuite/cp/cp-dir-existing-dir

    r821 r1765  
    1 mkdir bar 
     1mkdir bar
    22touch bar/baz
    33mkdir foo
    4 busybox cp -R bar foo 
    5 test -f foo/bar/baz 
     4busybox cp -R bar foo
     5test -f foo/bar/baz
  • branches/2.2.5/mindi-busybox/testsuite/grep.tests

    r821 r1765  
    55# Licensed under GPL v2, see file LICENSE for details.
    66
    7 # AUDIT: 
     7# AUDIT:
    88
    99. testing.sh
  • branches/2.2.5/mindi-busybox/testsuite/mount.testroot

    r821 r1765  
    8787# Fun with mount -a
    8888
    89 testing "mount -a no fstab" "mount -a 2>/dev/null || echo yes" "yes\n" "" "" 
     89testing "mount -a no fstab" "mount -a 2>/dev/null || echo yes" "yes\n" "" ""
    9090
    9191umount /proc
  • branches/2.2.5/mindi-busybox/testsuite/pidof.tests

    r821 r1765  
    55# Licensed under GPL v2, see file LICENSE for details.
    66
    7 # AUDIT: 
     7# AUDIT:
    88
    99. testing.sh
     
    2525testing "pidof -o %PPID" "pidof -o %PPID pidof.tests | grep -o -w $$" "" "" ""
    2626testing "pidof -o %PPID NOP" "pidof -o %PPID -s init" "1\n" "" ""
    27 testing "pidof -o init" "pidof -o 1 init | grep -o -w 1" "" "" "" 
     27testing "pidof -o init" "pidof -o 1 init | grep -o -w 1" "" "" ""
    2828
    2929exit $FAILCOUNT
  • branches/2.2.5/mindi-busybox/testsuite/readlink.tests

    r821 r1765  
    2929
    3030# clean up
    31 rm -r "$TESTLINK" "$TESTDIR" 
     31rm -r "$TESTLINK" "$TESTDIR"
    3232
  • branches/2.2.5/mindi-busybox/testsuite/runtest

    r821 r1765  
    77# Run old-style test.
    88
    9 function run_applet_testcase
     9run_applet_testcase()
    1010{
    1111    local applet=$1
     
    5656}
    5757
    58 run_applet_tests ()
     58run_applet_tests()
    5959{
    6060    local applet=$1
     
    9595# Populate a directory with links to all busybox applets
    9696
    97 LINKSDIR="${bindir}/runtest-tempdir-links"
     97LINKSDIR="$bindir/runtest-tempdir-links"
     98implemented=$($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    )
    98108rm -rf "$LINKSDIR" 2>/dev/null
    99109mkdir "$LINKSDIR"
    100 for i in $(sed 's@/[a-z0-9/\[]*/@@' $bindir/busybox.links 2>/dev/null)
     110for i in $implemented
    101111do
    102112    ln -s $bindir/busybox "$LINKSDIR"/$i
     
    128138        fi
    129139        if PATH="$LINKSDIR":$srcdir:$bindir:$PATH \
    130             "${srcdir:-.}/$applet".tests
     140                "${srcdir:-.}/$applet".tests
    131141        then
    132           :
     142            :
    133143        else
    134           status=1
     144            status=1
    135145        fi
    136146    fi
  • branches/2.2.5/mindi-busybox/testsuite/sed.tests

    r902 r1765  
    117117    "woo" "woo"
    118118testing "sed empty file plus cat" "sed -e 's/nohit//' input -" "one\ntwo" \
    119     "" "one\ntwo" 
     119    "" "one\ntwo"
    120120testing "sed cat plus empty file" "sed -e 's/nohit//' input -" "one\ntwo" \
    121121    "one\ntwo" ""
     
    139139testing "sed clusternewline" \
    140140    "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"
     142testing "sed subst+write" \
     143    "sed -e 's/i/z/' -e 'woutputw' input -; echo -n X; cat outputw" \
     144    "thzngy\nagaznXthzngy\nagazn" "thingy" "again"
     145rm outputw
     146testing "sed trailing NUL" \
     147    "sed 's/i/z/' input -" \
     148    "a\0b\0\nc" "a\0b\0" "c"
     149testing "sed escaped newline in command" \
     150    "sed 's/a/z\\
     151z/' input" \
     152    "z\nz" "a" ""
    142153
    143154# Test end-of-file matching behavior
     
    147158testing "sed match EOF two files" "sed -e '"'$p'"' input -" \
    148159    "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.
    149165echo -ne "three\nfour" > input2
    150166testing "sed match EOF inline" \
  • branches/2.2.5/mindi-busybox/testsuite/sort.tests

    r821 r1765  
    5757" "$data" ""
    5858
    59 # 
     59#
    6060
    6161testing "sort key range with multiple options" "sort -k2,3rn input" \
     
    6767" "$data" ""
    6868
     69testing "sort key range with two -k options" "sort -k 2,2n -k 1,1r input" "\
     70d 2
     71b 2
     72c 3
     73" "\
     74c 3
     75b 2
     76d 2
     77" ""
     78
     79testing "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
     87testing "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
     95testing "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
     103testing "sort -u should consider field only when discarding" "sort -u -k2 input" "\
     104a c
     105" "\
     106a c
     107b c
     108" ""
     109
    69110testing "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"
    82112
    83113exit $FAILCOUNT
  • branches/2.2.5/mindi-busybox/testsuite/testing.sh

    r821 r1765  
    5252# The testing function
    5353
    54 testing ()
     54testing()
    5555{
    5656  NAME="$1"
     
    7777  RETVAL=$?
    7878
    79   cmp expected actual > /dev/null
     79  cmp expected actual >/dev/null 2>/dev/null
    8080  if [ $? -ne 0 ]
    8181  then
     
    9898# are copied.
    9999
    100 function mkchroot
     100mkchroot()
    101101{
    102102  [ $# -lt 2 ] && return
     
    127127# Script fed to stdin.
    128128
    129 function dochroot
     129dochroot()
    130130{
    131131  mkdir tmpdir4chroot
  • branches/2.2.5/mindi-busybox/testsuite/tr/tr-d-works

    r821 r1765  
    22echo testing | busybox tr -d aeiou > logfile.bb
    33
    4 cmp logfile.gnu logfile.bb
     4diff -u logfile.gnu logfile.bb
  • branches/2.2.5/mindi-busybox/testsuite/tr/tr-works

    r821 r1765  
    88{
    99    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]'
    1111    run_tr "abc[]"      "a[b"       AXB
    1212    run_tr abc      '[:alpha:]'     A-ZA-Z
     
    1818    run_tr 'a b'        '[= =]'     X
    1919    run_tr "[:"     '[:'        ab
     20    run_tr "    .,:"    '[:punct:]' 12
     21    run_tr "    .,:"    '[:cntrl:]' 12
    2022}
    2123
    2224bb=        tr_test > logfile.gnu
    2325bb=busybox tr_test > logfile.bb
    24 cmp logfile.gnu logfile.bb
     26diff -u logfile.gnu logfile.bb
  • branches/2.2.5/mindi-busybox/testsuite/uniq.tests

    r821 r1765  
    4141#-c occurrences
    4242#-d dups only
    43 #-u 
     43#-u
    4444
    4545# 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.
     2test "`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.