diff options
author | Pádraig Brady <P@draigBrady.com> | 2022-04-11 15:37:04 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2022-04-11 15:47:16 +0100 |
commit | 2122ceba8e3da8a04e40dc168d736af0c09a3930 (patch) | |
tree | c2d211a69ce53969bf867b0a1324acf8d94253c9 | |
parent | e43099f6e95087fa375d8e0b81d6e97dcb1936b4 (diff) | |
download | coreutils-2122ceba8e3da8a04e40dc168d736af0c09a3930.tar.gz |
tests: b2sum.sh: fix false failure on cygwin
* tests/misc/b2sum.sh: Avoid binary '*' tags when comparing checksums.
Reported by Bruno Haible
-rwxr-xr-x | tests/misc/b2sum.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/misc/b2sum.sh b/tests/misc/b2sum.sh index 1602aec89..30897021d 100755 --- a/tests/misc/b2sum.sh +++ b/tests/misc/b2sum.sh @@ -41,8 +41,9 @@ $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 -l $l /dev/null | tee -a check.vals > check.b2sum + $prog $tag_opt $text_opt -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 @@ -50,7 +51,8 @@ done # Ensure the checksum values are correct. The reference # check.vals was created with the upstream SSE reference implementation. [ "$prog" != 'b2sum' ] && tag_opt='--untagged' || tag_opt='' -$prog $tag_opt --length=128 check.vals > out || fail=1 +$prog $tag_opt --length=128 check.vals > out.tmp || fail=1 +tr '*' ' ' < out.tmp > out || framework_failure_ # Remove binary tag on cygwin printf '%s\n' '796485dd32fe9b754ea5fd6c721271d9 check.vals' > exp compare exp out || fail=1 |