awk: do not allow $(-1)
[oweals/busybox.git] / testsuite / od.tests
index 60f22d5dd75de0adf9a5761c318bc5603efc4b8b..0880e0d2ff531c6d9a141137cc08d1c81114d826 100755 (executable)
@@ -1,17 +1,49 @@
 #!/bin/sh
 # Copyright 2008 by Denys Vlasenko
-# Licensed under GPL v2, see file LICENSE for details.
+# Licensed under GPLv2, see file LICENSE in this source tree.
 
-. testing.sh
+. ./testing.sh
 
-# testing "test name" "options" "expected result" "file input" "stdin"
+# testing "test name" "commands" "expected result" "file input" "stdin"
 
+optional DESKTOP
 testing "od -b" \
-       "echo HELLO | od -b" \
+       "od -b" \
 "\
-0000000 110 105 114 114 117 012
-0000006
+0000000 110 105 114 114 117
+0000005
 " \
        "" "HELLO"
+SKIP=
+
+optional DESKTOP
+testing "od -f" \
+       "od -f" \
+"\
+0000000   0.0000000e+00   0.0000000e+00
+0000010
+" \
+       "" "\x00\x00\x00\x00\x00\x00\x00\x00"
+SKIP=
+
+optional DESKTOP LONG_OPTS
+testing "od -b --traditional" \
+       "od -b --traditional" \
+"\
+0000000 110 105 114 114 117
+0000005
+" \
+       "" "HELLO"
+SKIP=
+
+optional DESKTOP LONG_OPTS
+testing "od -b --traditional FILE" \
+       "od -b --traditional input" \
+"\
+0000000 110 105 114 114 117
+0000005
+" \
+       "HELLO" ""
+SKIP=
 
 exit $FAILCOUNT