diff options
| author | Pádraig Brady <P@draigBrady.com> | 2025-10-07 15:24:12 +0100 |
|---|---|---|
| committer | Pádraig Brady <P@draigBrady.com> | 2025-10-07 15:58:36 +0100 |
| commit | 51f27a15b0e2a0c12f211dcd957bbb39738ff4c4 (patch) | |
| tree | 86acf041ded50ce89a61b42e42ecc8a6ebe5a272 /tests | |
| parent | maint: cksum: document a base64/hex parsing ambiguity with untagged (diff) | |
| download | coreutils-51f27a15b0e2a0c12f211dcd957bbb39738ff4c4.tar.gz coreutils-51f27a15b0e2a0c12f211dcd957bbb39738ff4c4.zip | |
tests: cksum: add a test case for robust file name parsing
* tests/cksum/cksum-c.sh: Add a test case where the file name
contains tagged format delimiter characters.
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/cksum/cksum-c.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/cksum/cksum-c.sh b/tests/cksum/cksum-c.sh index 79986d577..4f00767f5 100755 --- a/tests/cksum/cksum-c.sh +++ b/tests/cksum/cksum-c.sh @@ -57,6 +57,12 @@ compare experr err || fail=1 # Ensure leading whitespace and \ ignored sed 's/^/ \\/' CHECKSUMS | cksum --strict -c || fail=1 +# Ensure file names with " (=" supported. +awkward_file='abc (f) = abc' +touch "$awkward_file" || framework_failure_ +cksum -a sha1 "$awkward_file" > tag-awkward.sum || framework_failure_ +cksum --check tag-awkward.sum || fail=1 + # Check common signed checksums format works in non strict mode cat >> signed_CHECKSUMS <<\EOF -----BEGIN PGP SIGNED MESSAGE----- |
