blob: 2e80be5fe97f8e3441f5e174dd880f11b33891fa [file] [log] [blame]
Denys Vlasenkodac5b832020-10-20 18:54:36 +02001#!/bin/sh
2
3# Copyright 2020 by Denys Vlasenko <vda.linux@googlemail.com>
4# Licensed under GPLv2, see file LICENSE in this source tree.
5
6. ./testing.sh
7
8# testing "description" "command" "result" "infile" "stdin"
9testing 'xxd -p with one NUL' \
10 'xxd -p' \
11 "\
1200
13" \
14 '' \
15 '\0'
16
17testing 'xxd -p with 30 NULs' \
18 'xxd -p' \
19 "\
20000000000000000000000000000000000000000000000000000000000000
21" \
22 '' \
23 '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
24
25testing 'xxd -p with 31 NULs' \
26 'xxd -p' \
27 "\
28000000000000000000000000000000000000000000000000000000000000
2900
30" \
31 '' \
32 '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'
33
34exit $FAILCOUNT