2008-04-14 19:50:06 +00:00
|
|
|
#!/bin/sh
|
|
|
|
# Copyright 2008 by Denys Vlasenko
|
2010-08-16 20:14:46 +02:00
|
|
|
# Licensed under GPLv2, see file LICENSE in this source tree.
|
2008-04-14 19:50:06 +00:00
|
|
|
|
2009-11-04 18:41:22 -05:00
|
|
|
. ./testing.sh
|
2008-04-14 19:50:06 +00:00
|
|
|
|
2011-05-21 17:43:06 +02:00
|
|
|
# testing "test name" "commands" "expected result" "file input" "stdin"
|
2008-04-14 19:50:06 +00:00
|
|
|
|
2010-05-11 03:53:57 +02:00
|
|
|
optional DESKTOP
|
2008-04-14 19:50:06 +00:00
|
|
|
testing "od -b" \
|
2008-04-14 19:56:46 +00:00
|
|
|
"od -b" \
|
2008-04-14 19:50:06 +00:00
|
|
|
"\
|
2008-04-14 19:56:46 +00:00
|
|
|
0000000 110 105 114 114 117
|
2009-07-18 16:22:26 +02:00
|
|
|
0000005
|
2008-04-14 19:50:06 +00:00
|
|
|
" \
|
|
|
|
"" "HELLO"
|
2010-05-11 03:53:57 +02:00
|
|
|
SKIP=
|
2008-04-14 19:50:06 +00:00
|
|
|
|
2017-07-19 10:43:10 +01:00
|
|
|
optional DESKTOP
|
|
|
|
testing "od -f" \
|
|
|
|
"od -f" \
|
|
|
|
"\
|
|
|
|
0000000 0.0000000e+00 0.0000000e+00
|
|
|
|
0000010
|
|
|
|
" \
|
|
|
|
"" "\x00\x00\x00\x00\x00\x00\x00\x00"
|
|
|
|
SKIP=
|
|
|
|
|
2011-08-10 00:51:29 +02:00
|
|
|
optional DESKTOP LONG_OPTS
|
2011-05-21 17:43:06 +02:00
|
|
|
testing "od -b --traditional" \
|
|
|
|
"od -b --traditional" \
|
|
|
|
"\
|
|
|
|
0000000 110 105 114 114 117
|
|
|
|
0000005
|
|
|
|
" \
|
|
|
|
"" "HELLO"
|
|
|
|
SKIP=
|
|
|
|
|
2011-08-10 00:51:29 +02:00
|
|
|
optional DESKTOP LONG_OPTS
|
2011-05-21 17:43:06 +02:00
|
|
|
testing "od -b --traditional FILE" \
|
|
|
|
"od -b --traditional input" \
|
|
|
|
"\
|
|
|
|
0000000 110 105 114 114 117
|
|
|
|
0000005
|
|
|
|
" \
|
|
|
|
"HELLO" ""
|
|
|
|
SKIP=
|
|
|
|
|
2008-04-14 19:50:06 +00:00
|
|
|
exit $FAILCOUNT
|