summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/hexdump.tests19
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/hexdump.tests b/testsuite/hexdump.tests
index 45a0c13..cfb2018 100755
--- a/testsuite/hexdump.tests
+++ b/testsuite/hexdump.tests
@@ -15,4 +15,23 @@ testing 'hexdump -C with four NULs' \
'' \
'\0\0\0\0'
+testing "hexdump does not think last padded block matches any full block" \
+ "hexdump -e '1/1 \"%02x|\"1/1 \"%02x!\\n\"'" \
+ "\
+00|00!
+*
+00| !
+" \
+ '' \
+ '\0\0\0\0\0\0\0\0\0\0\0'
+
+testing "hexdump thinks last full block can match" \
+ "hexdump -e '1/1 \"%02x|\"1/1 \"%02x!\\n\"'" \
+ "\
+00|00!
+*
+" \
+ '' \
+ '\0\0\0\0\0\0\0\0\0\0\0\0'
+
exit $FAILCOUNT