Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (6 years ago)
Author:
bruno
Message:
  • Update mindi-busybox to 1.21.1
Location:
branches/3.2/mindi-busybox/testsuite
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/testsuite/awk.tests

    r2725 r3232  
    1717testing "awk -F case 7" "awk -F '[#]' '{ print NF }'" "5\n" "" "z##abc##zz\n"
    1818
     19# conditions and operators
     20testing "awk if operator == "  "awk 'BEGIN{if(23==23) print \"foo\"}'" "foo\n" "" ""
     21testing "awk if operator != "  "awk 'BEGIN{if(23!=23) print \"bar\"}'" ""      "" ""
     22testing "awk if operator >= "  "awk 'BEGIN{if(23>=23) print \"foo\"}'" "foo\n" "" ""
     23testing "awk if operator < "   "awk 'BEGIN{if(2 < 13) print \"foo\"}'" "foo\n" "" ""
     24testing "awk if string == "    "awk 'BEGIN{if(\"a\"==\"ab\") print \"bar\"}'" "" "" ""
     25
    1926# 4294967295 = 0xffffffff
    2027testing "awk bitwise op"  "awk '{ print or(4294967295,1) }'" "4.29497e+09\n" "" "\n"
     
    3643    "" \
    3744    "a--\na--b--\na--b--c--\na--b--c--d--"
     45
     46testing "awk -F handles escapes" "awk -F'\\x21' '{print \$1}'" \
     47    "a\n" \
     48    "" \
     49    "a!b\n"
    3850
    3951# '@(samp|code|file)\{' is an invalid extended regex (unmatched '{'),
     
    203215    "" ""
    204216
     217testing "awk handles empty ()" \
     218    "awk 'BEGIN {print()}' 2>&1" "awk: cmd. line:1: Empty sequence\n" "" ""
     219
     220testing "awk FS assignment" "awk '{FS=\":\"; print \$1}'" \
     221    "a:b\ne\n" \
     222    "" \
     223    "a:b c:d\ne:f g:h"
     224
     225# testing "description" "command" "result" "infile" "stdin"
     226
    205227exit $FAILCOUNT
  • branches/3.2/mindi-busybox/testsuite/bzcat.tests

    r2725 r3232  
    5252rm -rf testdir
    5353
     54
     55
     56# Copyright 2011 by Denys Vlasenko
     57# Licensed under GPLv2, see file LICENSE in this source tree.
     58
     59. ./testing.sh
     60
     61# testing "test name" "command" "expected result" "file input" "stdin"
     62
     63# "input" file is bzipped file with "a\n" data
     64testing "bzcat can print many files" \
     65"$ECHO -ne '$hexdump' | bzcat input input; echo \$?" \
     66"\
     67a
     68a
     690
     70" "\
     71\x42\x5a\x68\x39\x31\x41\x59\x26\x53\x59\x63\x3e\xd6\xe2\x00\x00\
     72\x00\xc1\x00\x00\x10\x20\x00\x20\x00\x21\x00\x82\xb1\x77\x24\x53\
     73\x85\x09\x06\x33\xed\x6e\x20\
     74" ""
     75
     76# "input" file is bzipped zero byte file
     77testing "bzcat can handle compressed zero-length bzip2 files" \
     78"$ECHO -ne '$hexdump' | bzcat input input; echo \$?" \
     79"0\n" \
     80"\x42\x5a\x68\x39\x17\x72\x45\x38\x50\x90\x00\x00\x00\x00" ""
     81
     82
     83
    5484exit $((FAILCOUNT <= 255 ? FAILCOUNT : 255))
  • branches/3.2/mindi-busybox/testsuite/date/date-R-works

    r2725 r3232  
    1 dt1="`date -R`"
    2 # Wait for the start of next second
    3 dt="$dt1"
    4 while test x"$dt" = x"$dt1"; do
    5     dt="`date -R`"
    6 done
     1# When different date's use time() and clock_gettime(),
     2# seconds transition may not happen at _exactly_ the same moment.
     3# Therefore we try it several times.
    74
    8 test x"$dt" = x"`busybox date -R`"
     5test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
     6test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
     7test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
     8test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
     9test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
     10test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
     11test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
     12test x"`date -R`" = x"`busybox date -R`" && exit 0 || true
     13false
  • branches/3.2/mindi-busybox/testsuite/du/du-k-works

    r2725 r3232  
    44dd if=/dev/zero of=file2 bs=1k count=16 2>/dev/null
    55test x"`busybox du -k .`" = x"80    ." \
     6  -o x"`busybox du -k .`" = x"84    ." \
    67  -o x"`busybox du -k .`" = x"88    ."
  • branches/3.2/mindi-busybox/testsuite/grep.tests

    r2725 r3232  
    88. ./testing.sh
    99
    10 # testing "test name" "options" "expected result" "file input" "stdin"
     10# testing "test name" "commands" "expected result" "file input" "stdin"
    1111#   file input will be file called "input"
    1212#   test can create a file "actual" instead of writing to stdout
     
    104104    "" "test\n"
    105105
     106testing "grep -f EMPTY_FILE" \
     107    "grep -f input" \
     108    "" \
     109    "" \
     110    "test\n"
     111
     112testing "grep -v -f EMPTY_FILE" \
     113    "grep -v -f input" \
     114    "test\n" \
     115    "" \
     116    "test\n"
     117
     118testing "grep -Fw matches only words" \
     119    "grep -Fw foo input" \
     120    "" \
     121    "foop\n" \
     122    ""
     123
     124testing "grep -Fw doesn't stop on 1st mismatch" \
     125    "grep -Fw foo input" \
     126    "foop foo\n" \
     127    "foop foo\n" \
     128    ""
     129
     130# testing "test name" "commands" "expected result" "file input" "stdin"
     131#   file input will be file called "input"
     132#   test can create a file "actual" instead of writing to stdout
     133
    106134exit $FAILCOUNT
  • branches/3.2/mindi-busybox/testsuite/ls.tests

    r2725 r3232  
    252252' "" ""
    253253
     254rm -rf ls.testdir 2>/dev/null
     255mkdir ls.testdir || exit 1
     256
     257# testing "test name" "command" "expected result" "file input" "stdin"
     258
     259test x"$CONFIG_FEATURE_LS_SORTFILES" = x"y" \
     260&& testing "ls symlink_to_dir" \
     261"touch ls.testdir/A ls.testdir/B; ln -s ls.testdir ls.link; ls ls.link; ls -1 ls.link/; ls -1 ls.link; rm -f ls.link" \
     262"A\nB\nA\nB\nA\nB\n" \
     263"" ""
     264
    254265# Clean up
    255266rm -rf ls.testdir 2>/dev/null
  • branches/3.2/mindi-busybox/testsuite/mdev.tests

    r2725 r3232  
    1212FILTER_LS2="grep -v '^total ' | sed -e 's/,  */,/g' -e 's/  */ /g' | cut -d' ' -f 1-4,9-"
    1313
    14 # testing "test name" "options" "expected result" "file input" "stdin"
     14# testing "test name" "commands" "expected result" "file input" "stdin"
    1515
    1616rm -rf mdev.testdir
     
    123123mdev.testdir/dev/disk:
    124124br--r--r-- 1 0 0 sda
     125" \
     126    "" ""
     127SKIP=
     128
     129# continuing to use directory structure from prev test
     130rm -rf mdev.testdir/dev/*
     131echo "sda 0:0 444 =disk/sd/a" >mdev.testdir/etc/mdev.conf
     132optional STATIC FEATURE_MDEV_CONF FEATURE_MDEV_RENAME FEATURE_LS_RECURSIVE FEATURE_LS_TIMESTAMPS FEATURE_LS_USERNAME
     133testing "mdev move rule '=bar/baz/fname'" \
     134    "env - PATH=$PATH ACTION=add DEVPATH=/block/sda chroot mdev.testdir /mdev 2>&1;
     135    ls -lnR mdev.testdir/dev | $FILTER_LS2" \
     136"\
     137mdev.testdir/dev:
     138drwxr-xr-x 3 0 0 disk
     139
     140mdev.testdir/dev/disk:
     141drwxr-xr-x 2 0 0 sd
     142
     143mdev.testdir/dev/disk/sd:
     144br--r--r-- 1 0 0 a
    125145" \
    126146    "" ""
  • branches/3.2/mindi-busybox/testsuite/mkfs.minix.tests

    r2725 r3232  
    99# testing "test name" "options" "expected result" "file input" "stdin"
    1010
     11# '\n' produces 10 on little endian, but not on big endian
     12cr=`echo | od -i | sed 's/ *$//g;s/.* //g;2d'`
     13if [ x"$cr" = x"10" ]; then
     14    hash=4f35f7afeba07d56055bed1f29ae20b7
     15else
     16    hash=5adbc1b3ccd20ca5d0ab5bc1e13ac3fc
     17fi
     18
    1119testing "mkfs.minix" \
    1220    "dd if=/dev/zero of=input bs=1k count=1024 2>/dev/null; mkfs.minix input; md5sum <input" \
     
    1624"Zonesize=1024\n"\
    1725"Maxsize=268966912\n"\
    18 "4f35f7afeba07d56055bed1f29ae20b7  -\n" \
     26"$hash  -\n" \
    1927    "" \
    2028    ""
  • branches/3.2/mindi-busybox/testsuite/mount.tests

    r2725 r3232  
    2121fi
    2222
    23 testdir=$PWD/mount.testdir
     23testdir="$PWD/mount.testdir"
    2424
    2525dd if=/dev/zero of=mount.image1m count=1 bs=1M 2>/dev/null || { echo "dd error"; exit 1; }
     
    3737"&& grep -Fc $testdir </proc/mounts "\
    3838"&& mount -o remount,mand $testdir "\
    39 "&& grep -F $testdir </proc/mounts | grep -c '[, ]mand[, ]'" \
     39"&& grep -F $testdir </proc/mounts | grep -c '[, ]mand[, ]'"\
     40"|| grep -F $testdir </proc/mounts" \
    4041    "1\n""1\n" \
    4142    "" ""
     
    4546rm mount.image1m
    4647
     48
     49# Bug: mount.shared1 directory shows no files (has to show files a and b)
     50optional FEATURE_LS_RECURSIVE FEATURE_LS_SORTFILES
     51testing "mount bind+rshared" "\
     52mkdir -p mount.dir mount.shared1 mount.shared2
     53touch mount.dir/a mount.dir/b
     54
     55mount --bind         mount.shared1 mount.shared1 2>&1
     56mount --make-rshared mount.shared1               2>&1
     57mount --bind         mount.shared2 mount.shared2 2>&1
     58mount --make-rshared mount.shared2               2>&1
     59
     60mount --bind mount.shared2 mount.shared1         2>&1
     61mount --bind mount.dir     mount.shared2         2>&1
     62
     63ls -R mount.dir mount.shared1 mount.shared2      2>&1
     64
     65umount mount.dir mount.shared1 mount.shared2 2>/dev/null
     66umount mount.dir mount.shared1 mount.shared2 2>/dev/null
     67umount mount.dir mount.shared1 mount.shared2 2>/dev/null
     68rm -f mount.dir/a mount.dir/b mount.dir/c
     69rmdir mount.dir mount.shared1 mount.shared2
     70" \
     71"\
     72mount.dir:
     73a
     74b
     75
     76mount.shared1:
     77a
     78b
     79
     80mount.shared2:
     81a
     82b
     83" \
     84    "" ""
     85SKIP=
     86
     87
     88testing "mount RO loop" "\
     89exec 2>&1
     90umount -d mount.dir 2>/dev/null
     91rmdir mount.dir     2>/dev/null
     92mkdir -p mount.dir
     93(
     94cd mount.dir                               || { echo 'cd error'; exit 1; }
     95mkdir z1 z2                                || { echo 'mkdir error'; exit 1; }
     96mount -t tmpfs tmpfs z1                    || { echo 'mount tmpfs error'; exit 1; }
     97dd if=/dev/zero of=z1/e2img count=10 bs=1M 2>/dev/null || { echo 'dd error'; exit 1; }
     98mke2fs -F z1/e2img                         2>/dev/null >&2 || { echo 'mke2fs error'; exit 1; }
     99mount -r -o loop -t ext2 z1/e2img z2       || { echo 'mount -r -o loop error'; exit 1; }
     100mount -o remount,ro z1                     || { echo 'mount -o remount,ro error'; exit 1; }
     101)
     102umount -d mount.dir/z2
     103##losetup -d /dev/loop*
     104umount -d mount.dir/z1
     105rm -rf mount.dir
     106echo DONE
     107" \
     108"DONE\n" "" ""
     109
     110
    47111exit $FAILCOUNT
  • branches/3.2/mindi-busybox/testsuite/od.tests

    r2725 r3232  
    55. ./testing.sh
    66
    7 # testing "test name" "options" "expected result" "file input" "stdin"
     7# testing "test name" "commands" "expected result" "file input" "stdin"
    88
    99optional DESKTOP
     
    1717SKIP=
    1818
     19optional DESKTOP LONG_OPTS
     20testing "od -b --traditional" \
     21    "od -b --traditional" \
     22"\
     230000000 110 105 114 114 117
     240000005
     25" \
     26    "" "HELLO"
     27SKIP=
     28
     29optional DESKTOP LONG_OPTS
     30testing "od -b --traditional FILE" \
     31    "od -b --traditional input" \
     32"\
     330000000 110 105 114 114 117
     340000005
     35" \
     36    "HELLO" ""
     37SKIP=
     38
    1939exit $FAILCOUNT
  • branches/3.2/mindi-busybox/testsuite/parse.tests

    r2725 r3232  
    9797[option][domain][local]
    9898[option][lease][864000]
     99[option][0x08][01020304]
    99100EOF
    100101
  • branches/3.2/mindi-busybox/testsuite/patch.tests

    r2725 r3232  
    176176" \
    177177
     178# testing "test name" "command(s)" "expected result" "file input" "stdin"
     179testing "patch at the beginning" \
     180    'patch 2>&1; cat input' \
     181"\
     182patching file input
     183111changed
     184444
     185555
     186666
     187777
     188888
     189999
     190" \
     191"\
     192111
     193222
     194333
     195444
     196555
     197666
     198777
     199888
     200999
     201" \
     202"\
     203--- input
     204+++ input
     205@@ -1,6 +1,4 @@
     206-111
     207-222
     208-333
     209+111changed
     210 444
     211 555
     212 666
     213" \
     214
     215# testing "test name" "command(s)" "expected result" "file input" "stdin"
     216testing "patch creates new file" \
     217    'patch 2>&1; echo $?; cat testfile; rm testfile' \
     218"\
     219creating testfile
     2200
     221qwerty
     222" "" "\
     223--- /dev/null
     224+++ testfile
     225@@ -0,0 +1 @@
     226+qwerty
     227"
     228
     229# testing "test name" "command(s)" "expected result" "file input" "stdin"
     230testing "patch understands ...dir///dir..." \
     231    'patch -p1 2>&1; echo $?' \
     232"\
     233patching file dir2///file
     234patch: can't open 'dir2///file': No such file or directory
     2351
     236" "" "\
     237--- bogus_dir///dir2///file
     238+++ bogus_dir///dir2///file
     239@@ -1,2 +1,3 @@
     240 qwe
     241+asd
     242 zxc
     243"
     244
    178245rm input.orig 2>/dev/null
    179246
  • branches/3.2/mindi-busybox/testsuite/runtest

    r2725 r3232  
    7575            *.r[0-9]*) continue ;; # svn-produced junk
    7676        esac
    77         run_applet_testcase "$applet" "$testcase" || status=1
    78         total_failed=$((total_failed + status))
     77        run_applet_testcase "$applet" "$testcase" || {
     78            status=1
     79            total_failed=$((total_failed + 1))
     80        }
    7981    done
    8082    return $status
  • branches/3.2/mindi-busybox/testsuite/sed.tests

    r2725 r3232  
    77. ./testing.sh
    88
    9 # testing "description" "arguments" "result" "infile" "stdin"
     9# testing "description" "commands" "result" "infile" "stdin"
    1010
    1111# Corner cases
     
    4949# substitutions
    5050testing "sed -n" "sed -n -e s/foo/bar/ -e s/bar/baz/" "" "" "foo\n"
     51testing "sed with empty match" "sed 's/z*//g'" "string\n" "" "string\n"
    5152testing "sed s//p" "sed -e s/foo/bar/p -e s/bar/baz/p" "bar\nbaz\nbaz\n" \
    5253    "" "foo\n"
    5354testing "sed -n s//p" "sed -ne s/abc/def/p" "def\n" "" "abc\n"
    54 test x"$SKIP_KNOWN_BUGS" = x"" && {
    5555testing "sed s//g (exhaustive)" "sed -e 's/[[:space:]]*/,/g'" ",1,2,3,4,5,\n" \
    5656    "" "12345\n"
    57 }
    5857testing "sed s arbitrary delimiter" "sed -e 's woo boing '" "boing\n" "" "woo\n"
    5958testing "sed s chains" "sed -e s/foo/bar/ -e s/bar/baz/" "baz\n" "" "foo\n"
     
    226225#   "" "12345"
    227226
    228 # testing "description" "arguments" "result" "infile" "stdin"
     227# testing "description" "commands" "result" "infile" "stdin"
    229228
    230229testing "sed n command must reset 'substituted' bit" \
     
    288287    "bar\nbar\n" "foo\n" ""
    289288
    290 
    291 # testing "description" "arguments" "result" "infile" "stdin"
     289testing "sed understands \r" \
     290    "sed 's/r/\r/'" \
     291    "\rrr\n" "" "rrr\n"
     292
     293testing "sed -i finishes ranges correctly" \
     294    "sed '1,2d' -i input; echo \$?; cat input" \
     295    "0\n3\n4\n" "1\n2\n3\n4\n" ""
     296
     297testing "sed zero chars match/replace advances correctly 1" \
     298    "sed 's/l*/@/g'" \
     299    "@h@e@o@\n" "" "helllo\n"
     300
     301testing "sed zero chars match/replace advances correctly 2" \
     302    "sed 's [^ .]* x g'" \
     303    "x x.x\n" "" " a.b\n"
     304
     305testing "sed zero chars match/replace logic must not falsely trigger here 1" \
     306    "sed 's/a/A/g'" \
     307    "_AAA1AA\n" "" "_aaa1aa\n"
     308
     309testing "sed zero chars match/replace logic must not falsely trigger here 2" \
     310    "sed 's/ *$/_/g'" \
     311    "qwerty_\n" "" "qwerty\n"
     312
     313# testing "description" "commands" "result" "infile" "stdin"
    292314
    293315exit $FAILCOUNT
  • branches/3.2/mindi-busybox/testsuite/tail.tests

    r2725 r3232  
    1515    "" "qw"
    1616
     17testing "tail: -c +N with largish N" \
     18    "
     19    dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8200 | wc -c;
     20    dd if=/dev/zero bs=16k count=1 2>/dev/null | tail -c +8208 | wc -c;
     21    " \
     22    "8185\n8177\n" \
     23    "" ""
     24
    1725exit $FAILCOUNT
  • branches/3.2/mindi-busybox/testsuite/tar.tests

    r2725 r3232  
    155155}
    156156
     157# Had a bug where on extract autodetect first "switched off" -z
     158# and then failed to recognize .tgz extension
     159optional FEATURE_TAR_CREATE FEATURE_SEAMLESS_GZ
     160testing "tar extract tgz" "\
     161dd count=1 bs=1M if=/dev/zero of=F0 2>/dev/null
     162tar -czf F0.tgz F0
     163rm F0
     164tar -xzvf F0.tgz && echo Ok
     165rm F0 || echo BAD
     166" "\
     167F0
     168Ok
     169" \
     170"" ""
     171SKIP=
     172
     173# Do we detect XZ-compressed data (even w/o .tar.xz or txz extension)?
     174# (the uuencoded hello_world.txz contains one empty file named "hello_world")
     175optional UUDECODE FEATURE_TAR_AUTODETECT FEATURE_SEAMLESS_XZ
     176testing "tar extract txz" "\
     177uudecode -o input && tar tf input && echo Ok
     178" "\
     179hello_world
     180Ok
     181" \
     182"" "\
     183begin-base64 644 hello_world.txz
     184/Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4AX/AEldADQZSe6ODIZQ3rSQ8kAJ
     185SnMPTX+XWGKW3Yu/Rwqg4Ik5wqgQKgVH97J8yA8IvZ4ahaCQogUNHRkXibr2
     186Q615wcb2G7fJU49AhWAAAAAAUA8gu9DyXfAAAWWADAAAAB5FXGCxxGf7AgAA
     187AAAEWVo=
     188====
     189"
     190SKIP=
     191
     192# On extract, everything up to and including last ".." component is stripped
     193optional FEATURE_TAR_CREATE
     194testing "tar strips /../ on extract" "\
     195rm -rf input_* test.tar 2>/dev/null
     196mkdir input_dir
     197echo Ok >input_dir/file
     198tar cf test.tar ./../tar.tempdir/input_dir/../input_dir 2>&1
     199rm -rf input_* 2>/dev/null
     200tar -vxf test.tar 2>&1
     201cat input_dir/file 2>&1
     202" "\
     203tar: removing leading './../tar.tempdir/input_dir/../' from member names
     204input_dir/
     205input_dir/file
     206Ok
     207" \
     208"" ""
     209SKIP=
     210
    157211
    158212cd .. && rm -rf tar.tempdir || exit 1
  • branches/3.2/mindi-busybox/testsuite/tar/tar-extracts-all-subdirs

    r1765 r3232  
    1010tar xf foo.tar -C foo ./1/10
    1111find foo | sort >logfile.gnu
    12 cmp logfile.gnu logfile.bb
     12diff -u logfile.gnu logfile.bb
  • branches/3.2/mindi-busybox/testsuite/testing.sh

    r2725 r3232  
    8888  $ECHO -ne "$3" > expected
    8989  $ECHO -ne "$4" > input
     90  [ -z "$VERBOSE" ] || echo ======================
    9091  [ -z "$VERBOSE" ] || echo "echo -ne '$4' >input"
    9192  [ -z "$VERBOSE" ] || echo "echo -ne '$5' | $2"
  • branches/3.2/mindi-busybox/testsuite/uuencode.tests

    r2725 r3232  
    99. ./testing.sh
    1010
    11 # testing "test name" "options" "expected result" "file input" "stdin"
    12 #   file input will be file called "input"
    13 #   test can create a file "actual" instead of writing to stdout
     11# testing "test name" "command(s)" "expected result" "file input" "stdin"
     12# file input will be file called "input"
     13# test can create a file "actual" instead of writing to stdout
    1414
    1515# Test setup of standard input
     
    2525"begin-base64 644 bb_uuenc_test.out\nVGhlIGZhc3QgZ3JleSBmb3gganVtcGVkIG92ZXIgdGhlIGxhenkgYnJvd24g\nZG9nLgo=\n====\n" \
    2626        "" "The fast grey fox jumped over the lazy brown dog.\n"
     27
     28testing "uuencode empty file" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     29'begin 644 FILE
     30`
     31end
     32' "" ""
     33testing "uuencode -m empty file" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     34'begin-base64 644 FILE
     35====
     36' "" ""
     37
     38testing "uuencode file 'A'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     39'begin 644 FILE
     40!00``
     41`
     42end
     43A' "" "A"
     44testing "uuencode -m file 'A'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     45'begin-base64 644 FILE
     46QQ==
     47====
     48A' "" "A"
     49
     50testing "uuencode file 'AB'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     51'begin 644 FILE
     52"04(`
     53`
     54end
     55AB' "" "AB"
     56testing "uuencode -m file 'AB'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     57'begin-base64 644 FILE
     58QUI=
     59====
     60AB' "" "AB"
     61
     62testing "uuencode file 'ABC'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     63'begin 644 FILE
     64#04)#
     65`
     66end
     67ABC' "" "ABC"
     68testing "uuencode -m file 'ABC'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     69'begin-base64 644 FILE
     70QUJD
     71====
     72ABC' "" "ABC"
     73
     74testing "uuencode file 'ABCD'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     75'begin 644 FILE
     76$04)#1```
     77`
     78end
     79ABCD' "" "ABCD"
     80testing "uuencode -m file 'ABCD'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     81'begin-base64 644 FILE
     82QUJDRA==
     83====
     84ABCD' "" "ABCD"
     85
     86testing "uuencode file 'ABCDE'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     87'begin 644 FILE
     88%04)#1$4`
     89`
     90end
     91ABCDE' "" "ABCDE"
     92testing "uuencode -m file 'ABCDE'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     93'begin-base64 644 FILE
     94QUJDREU=
     95====
     96ABCDE' "" "ABCDE"
     97
     98testing "uuencode file 'ABCDEF'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     99'begin 644 FILE
     100&04)#1$5&
     101`
     102end
     103ABCDEF' "" "ABCDEF"
     104testing "uuencode -m file 'ABCDEF'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     105'begin-base64 644 FILE
     106QUJDREVG
     107====
     108ABCDEF' "" "ABCDEF"
     109
     110testing "uuencode file 'A<NUL><0xff>Z'" 'r=`uuencode FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     111'begin 644 FILE
     112$00#_6@``
     113`
     114end
     115A\x0\xffZ' "" "A\x0\xffZ"
     116testing "uuencode -m file 'A<NUL><0xff>Z'" 'r=`uuencode -m FILE`; echo "$r"; echo "$r" | uudecode -o -;' \
     117'begin-base64 644 FILE
     118QQD/Wg==
     119====
     120A\x0\xffZ' "" "A\x0\xffZ"
     121
    27122exit $FAILCOUNT
Note: See TracChangeset for help on using the changeset viewer.