From: Pádraig Brady
Date: Tue, 7 Oct 2025 14:24:12 +0000 (+0100) Subject: tests: cksum: add a test case for robust file name parsing X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51f27a15b0e2a0c12f211dcd957bbb39738ff4c4;p=thirdparty%2Fcoreutils.git 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. --- diff --git a/tests/cksum/cksum-c.sh b/tests/cksum/cksum-c.sh index 79986d5778..4f00767f5f 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-----