From 51f27a15b0e2a0c12f211dcd957bbb39738ff4c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?P=C3=A1draig=20Brady?= Date: Tue, 7 Oct 2025 15:24:12 +0100 Subject: [PATCH] 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. --- tests/cksum/cksum-c.sh | 6 ++++++ 1 file changed, 6 insertions(+) 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----- -- 2.47.3