diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2022-08-22 15:57:57 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2022-08-22 15:57:57 +0200 |
commit | 0011a6bc2024ec4ee6d8edea203524e758d67833 (patch) | |
tree | ab59ddb1493e100ebd203609d9e91f2d633c3b6f | |
parent | f318adaaab3288fe72cb853bf7ede56790a13182 (diff) | |
download | busybox-w32-0011a6bc2024ec4ee6d8edea203524e758d67833.tar.gz busybox-w32-0011a6bc2024ec4ee6d8edea203524e758d67833.tar.bz2 busybox-w32-0011a6bc2024ec4ee6d8edea203524e758d67833.zip |
xxd: add two more testcases
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rwxr-xr-x | testsuite/xxd.tests | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/testsuite/xxd.tests b/testsuite/xxd.tests index 359e7f8f7..2c740abc8 100755 --- a/testsuite/xxd.tests +++ b/testsuite/xxd.tests | |||
@@ -40,10 +40,24 @@ testing 'xxd -p -r' \ | |||
40 | testing 'xxd -r skips leading whitespace and truncates at two spaces' \ | 40 | testing 'xxd -r skips leading whitespace and truncates at two spaces' \ |
41 | 'xxd -r' \ | 41 | 'xxd -r' \ |
42 | '0123456789:;<=>?@' \ | 42 | '0123456789:;<=>?@' \ |
43 | '' \ | 43 | '' "\ |
44 | "\ | ||
45 | 00000000: 3031 3233 3435 3637 3839 3a3b 3c3d 3e3f 0123456789:;<=>? | 44 | 00000000: 3031 3233 3435 3637 3839 3a3b 3c3d 3e3f 0123456789:;<=>? |
46 | 00000010: 40 @ | 45 | 00000010: 40 @ |
47 | " | 46 | " |
48 | 47 | ||
48 | testing 'xxd -p -r skips one bad char, truncates at two bad chars' \ | ||
49 | 'xxd -p -r' \ | ||
50 | '01' \ | ||
51 | '' "\ | ||
52 | 30 !31 !!32 | ||
53 | " | ||
54 | |||
55 | testing 'xxd -p -r ignores the nibble with 2nd char bad' \ | ||
56 | 'xxd -p -r' \ | ||
57 | '3C6' \ | ||
58 | '' "\ | ||
59 | 33 3!4 3!!5 | ||
60 | 36 | ||
61 | " | ||
62 | |||
49 | exit $FAILCOUNT | 63 | exit $FAILCOUNT |