Hello,
The attached patch checks for a code path that wasn't covered before
(afaik).
As a side note, the various combinations of --tag / --untagged and
--binary / --text is producing some unexpected results at time :)
Maybe that ship sailed 10 or 20 years ago but would it make sense to
reject --tag & --untagged (and binary/text) passed together?
Thanks,
Sylvestre
From 7716c389a462227c9921984bd040b3af148275be Mon Sep 17 00:00:00 2001
From: Sylvestre Ledru <sylves...@debian.org>
Date: Fri, 3 May 2024 19:48:13 +0200
Subject: [PATCH] cksum: add tests to verify the presence of "*"
* tests/cksum/cksum-a.sh: Add a test case.
---
tests/cksum/cksum-a.sh | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/cksum/cksum-a.sh b/tests/cksum/cksum-a.sh
index 2933940c6..c4a348b63 100755
--- a/tests/cksum/cksum-a.sh
+++ b/tests/cksum/cksum-a.sh
@@ -67,4 +67,11 @@ cksum --untagged -a md5 /dev/null >out || fail=1
compare out out-1 || fail=1
compare out out-2 || fail=1
+# check that the '*' is present
+cksum --tag --untagged --binary -a md5 /dev/null >out || fail=1
+grep -q " *" out || { fail=1; cat out; }
+# Verify that the order does not reset binary indicator
+cksum --binary --untagged -a md5 /dev/null >out-1 || fail=1
+compare out out-1 || fail=1
+
Exit $fail
--
2.43.0