1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 11:07:44 +00:00

cksum base64: update the GNU test to manage our output

This commit is contained in:
Sylvestre Ledru 2024-06-04 22:26:22 +02:00
parent 6922e7f057
commit ab2cc2f17a
3 changed files with 19 additions and 1 deletions

View file

@ -0,0 +1,15 @@
diff --git a/tests/cksum/cksum-base64.pl b/tests/cksum/cksum-base64.pl
index a037a1628..c6d87d447 100755
--- a/tests/cksum/cksum-base64.pl
+++ b/tests/cksum/cksum-base64.pl
@@ -91,8 +91,8 @@ my $prog = 'cksum';
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
# Ensure hash names from cksum --help match those in @pairs above.
-my $help_algs = join ' ', map { m{^ ([[:alpha:]]\S+)} }
- grep { m{^ ([[:alpha:]]\S+)} } split ('\n', `cksum --help`);
+my $help_algs = join ' ', map { m{^\s*-\s*([[:alpha:]]\S+):} ? $1 : () }
+ grep { m{^\s*-\s*([[:alpha:]]\S+):} } split ('\n', `cksum --help`);
my $test_algs = join ' ', map {$_->[0]} @pairs;
$help_algs eq $test_algs or die "$help_algs not equal to\n$test_algs";