From f4e2e2bb577829b3c68f1ed18884ff00f9def819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Sun, 27 Aug 2023 19:52:13 +0100 Subject: [PATCH] cksum: adjust tests and docs to binary mode handling Following commit v9.3-80-g5e1e0993b which makes cksum match the output of the standalone utilities... * doc/coreutils.texi (cksum output modes): Remove the mention that cksum never outputs a binary indicator, as that's no longer the case. * tests/cksum/b2sum.sh: Avoid outputting a binary indicator. * tests/cksum/sm3sum.pl: Likewise. --- doc/coreutils.texi | 3 +-- tests/cksum/b2sum.sh | 3 +-- tests/cksum/sm3sum.pl | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/coreutils.texi b/doc/coreutils.texi index 638fffd0f..14d9ba5e6 100644 --- a/doc/coreutils.texi +++ b/doc/coreutils.texi @@ -4046,8 +4046,7 @@ For each @var{file}, we print the checksum, a space, a flag indicating binary or text input mode, and the file name. Binary mode is indicated with @samp{*}, text mode with @samp{ } (space). Binary mode is the default on systems where it's significant, -otherwise text mode is the default. The @command{cksum} command always -uses binary mode and a @samp{ } (space) flag. +otherwise text mode is the default. @end table diff --git a/tests/cksum/b2sum.sh b/tests/cksum/b2sum.sh index 7013b4972..475faa2bc 100755 --- a/tests/cksum/b2sum.sh +++ b/tests/cksum/b2sum.sh @@ -41,9 +41,8 @@ $prog --strict -c openssl.b2sum || fail=1 rm -f check.vals || framework_failure_ # Ensure we can check non tagged format [ "$prog" != 'b2sum' ] && tag_opt='--untagged' || tag_opt='' -[ "$prog" == 'b2sum' ] && text_opt='--text' || text_opt='' for l in 0 128; do - $prog $tag_opt $text_opt -l $l /dev/null | tee -a check.vals > check.b2sum + $prog $tag_opt --text -l $l /dev/null | tee -a check.vals > check.b2sum $prog -l $l --strict -c check.b2sum || fail=1 $prog --strict -c check.b2sum || fail=1 done diff --git a/tests/cksum/sm3sum.pl b/tests/cksum/sm3sum.pl index 3872fface..6356ae4aa 100755 --- a/tests/cksum/sm3sum.pl +++ b/tests/cksum/sm3sum.pl @@ -45,7 +45,7 @@ my @Tests = my $t; foreach $t (@Tests) { - splice @$t, 1, 0, '--untagged -a sm3' + splice @$t, 1, 0, '--untagged --text -a sm3' } my $save_temps = $ENV{DEBUG}; -- 2.41.0