dac5b83142
function old new delta bb_dump_dump 1497 1523 +26 xxd_main 459 466 +7 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 33/0) Total: 33 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
35 lines
669 B
Bash
Executable File
35 lines
669 B
Bash
Executable File
#!/bin/sh
|
|
|
|
# Copyright 2020 by Denys Vlasenko <vda.linux@googlemail.com>
|
|
# Licensed under GPLv2, see file LICENSE in this source tree.
|
|
|
|
. ./testing.sh
|
|
|
|
# testing "description" "command" "result" "infile" "stdin"
|
|
testing 'xxd -p with one NUL' \
|
|
'xxd -p' \
|
|
"\
|
|
00
|
|
" \
|
|
'' \
|
|
'\0'
|
|
|
|
testing 'xxd -p with 30 NULs' \
|
|
'xxd -p' \
|
|
"\
|
|
000000000000000000000000000000000000000000000000000000000000
|
|
" \
|
|
'' \
|
|
'\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'
|
|
|
|
testing 'xxd -p with 31 NULs' \
|
|
'xxd -p' \
|
|
"\
|
|
000000000000000000000000000000000000000000000000000000000000
|
|
00
|
|
" \
|
|
'' \
|
|
'\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'
|
|
|
|
exit $FAILCOUNT
|