From e5d5f5b9a770de5a48d1a3bd293d5d611d6624c4 Mon Sep 17 00:00:00 2001
From: Denys Vlasenko <vda.linux@googlemail.com>
Date: Tue, 3 Jul 2018 16:27:54 +0200
Subject: hexdump: fix short file of zero butes treated as dup

function                                             old     new   delta
bb_dump_dump                                        1466    1491     +25

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
---
 testsuite/hexdump.tests | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100755 testsuite/hexdump.tests

(limited to 'testsuite')

diff --git a/testsuite/hexdump.tests b/testsuite/hexdump.tests
new file mode 100755
index 000000000..45a0c1300
--- /dev/null
+++ b/testsuite/hexdump.tests
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Copyright 2018 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 'hexdump -C with four NULs' \
+	'hexdump -C' \
+	"\
+00000000  00 00 00 00                                       |....|
+00000004
+" \
+	'' \
+	'\0\0\0\0'
+
+exit $FAILCOUNT
-- 
cgit v1.2.3