]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
cksum: adjust tests and docs to binary mode handling
authorPádraig Brady <P@draigBrady.com>
Sun, 27 Aug 2023 18:52:13 +0000 (19:52 +0100)
committerPádraig Brady <P@draigBrady.com>
Sun, 27 Aug 2023 18:53:52 +0000 (19:53 +0100)
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
tests/cksum/b2sum.sh
tests/cksum/sm3sum.pl

index 638fffd0f7a275fdedc2c78ea78eeac2bbe511a4..14d9ba5e666261196ae37df05a1c93eadd56990f 100644 (file)
@@ -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
 
index 7013b4972c3c6c2f64be8cee37d57b22a18b060c..475faa2bc84e75abbe9373efb0e3d9c945417ab3 100755 (executable)
@@ -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
index 3872fface48768381c23c751969311aa92dfcc82..6356ae4aabf4627c9cea51a89157ed765204ab02 100755 (executable)
@@ -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};