blob: 0880e0d2ff531c6d9a141137cc08d1c81114d826 [file] [log] [blame]
Denis Vlasenko7089c312008-04-14 19:50:06 +00001#!/bin/sh
2# Copyright 2008 by Denys Vlasenko
Denys Vlasenko0ef64bd2010-08-16 20:14:46 +02003# Licensed under GPLv2, see file LICENSE in this source tree.
Denis Vlasenko7089c312008-04-14 19:50:06 +00004
Mike Frysingercaa79402009-11-04 18:41:22 -05005. ./testing.sh
Denis Vlasenko7089c312008-04-14 19:50:06 +00006
Denys Vlasenko5c10fa52011-05-21 17:43:06 +02007# testing "test name" "commands" "expected result" "file input" "stdin"
Denis Vlasenko7089c312008-04-14 19:50:06 +00008
Denys Vlasenkobfa1b2e2010-05-11 03:53:57 +02009optional DESKTOP
Denis Vlasenko7089c312008-04-14 19:50:06 +000010testing "od -b" \
Denis Vlasenko3cfebe42008-04-14 19:56:46 +000011 "od -b" \
Denis Vlasenko7089c312008-04-14 19:50:06 +000012"\
Denis Vlasenko3cfebe42008-04-14 19:56:46 +0000130000000 110 105 114 114 117
Denys Vlasenko6ae64262009-07-18 16:22:26 +0200140000005
Denis Vlasenko7089c312008-04-14 19:50:06 +000015" \
16 "" "HELLO"
Denys Vlasenkobfa1b2e2010-05-11 03:53:57 +020017SKIP=
Denis Vlasenko7089c312008-04-14 19:50:06 +000018
Ron Yorstona1656032017-07-19 10:43:10 +010019optional DESKTOP
20testing "od -f" \
21 "od -f" \
22"\
230000000 0.0000000e+00 0.0000000e+00
240000010
25" \
26 "" "\x00\x00\x00\x00\x00\x00\x00\x00"
27SKIP=
28
Denys Vlasenkob47b3ce2011-08-10 00:51:29 +020029optional DESKTOP LONG_OPTS
Denys Vlasenko5c10fa52011-05-21 17:43:06 +020030testing "od -b --traditional" \
31 "od -b --traditional" \
32"\
330000000 110 105 114 114 117
340000005
35" \
36 "" "HELLO"
37SKIP=
38
Denys Vlasenkob47b3ce2011-08-10 00:51:29 +020039optional DESKTOP LONG_OPTS
Denys Vlasenko5c10fa52011-05-21 17:43:06 +020040testing "od -b --traditional FILE" \
41 "od -b --traditional input" \
42"\
430000000 110 105 114 114 117
440000005
45" \
46 "HELLO" ""
47SKIP=
48
Denis Vlasenko7089c312008-04-14 19:50:06 +000049exit $FAILCOUNT