Denys Vlasenko | e5d5f5b | 2018-07-03 16:27:54 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Copyright 2018 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" |
| 9 | testing 'hexdump -C with four NULs' \ |
| 10 | 'hexdump -C' \ |
| 11 | "\ |
| 12 | 00000000 00 00 00 00 |....| |
| 13 | 00000004 |
| 14 | " \ |
| 15 | '' \ |
| 16 | '\0\0\0\0' |
| 17 | |
Denys Vlasenko | 079487b | 2020-10-20 19:26:52 +0200 | [diff] [blame] | 18 | testing "hexdump does not think last padded block matches any full block" \ |
| 19 | "hexdump -e '1/1 \"%02x|\"1/1 \"%02x!\\n\"'" \ |
| 20 | "\ |
| 21 | 00|00! |
| 22 | * |
| 23 | 00| ! |
| 24 | " \ |
| 25 | '' \ |
| 26 | '\0\0\0\0\0\0\0\0\0\0\0' |
| 27 | |
| 28 | testing "hexdump thinks last full block can match" \ |
| 29 | "hexdump -e '1/1 \"%02x|\"1/1 \"%02x!\\n\"'" \ |
| 30 | "\ |
| 31 | 00|00! |
| 32 | * |
| 33 | " \ |
| 34 | '' \ |
| 35 | '\0\0\0\0\0\0\0\0\0\0\0\0' |
| 36 | |
Denys Vlasenko | e5d5f5b | 2018-07-03 16:27:54 +0200 | [diff] [blame] | 37 | exit $FAILCOUNT |