diff options
author | Mattias Andrée <maandree@kth.se> | 2020-10-21 16:27:46 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-10-21 16:27:52 +0200 |
commit | 9846f40d461ca7515b61bd1dd9a29e71af25aa97 (patch) | |
tree | 127d3e859950313d81446306b561b381f75cecd9 | |
parent | Add sha3sum for compatibility with busybox (-w and -s are however not support) (diff) | |
download | sha3sum-9846f40d461ca7515b61bd1dd9a29e71af25aa97.tar.gz sha3sum-9846f40d461ca7515b61bd1dd9a29e71af25aa97.tar.bz2 sha3sum-9846f40d461ca7515b61bd1dd9a29e71af25aa97.tar.xz |
Update test for -z
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rwxr-xr-x | test | 27 |
1 files changed, 26 insertions, 1 deletions
@@ -156,7 +156,32 @@ set -e test $x = 1 -## TODO add tests with -z +printf 'dalet' > .testdir/d + +./sha3-224sum -z .testdir/a .testdir/b .testdir/c .testdir/d > .testdir/sums-1z +./sha3-224sum -z .testdir/b .testdir/a .testdir/d .testdir/c > .testdir/sums-2z + +./sha3-224sum -cz .testdir/sums-1z +./sha3-224sum -cz .testdir/sums-2z + +./sha3-224sum -cz < .testdir/sums-1z +./sha3-224sum -cz < .testdir/sums-2z + +rm .testdir/d +set +e +./sha3-224sum -cz .testdir/sums-1z +x=$? +set -e +test $x = 1 +printf '' > .testdir/d +set +e +./sha3-224sum -cz .testdir/sums-1z +x=$? +set -e +test $x = 1 + +! test "$(./sha3-224sum < .testdir/sums-1z)" = "$(./sha3-224sum < .testdir/sums-1)" +test "$(./sha3-224sum < .testdir/sums-1z)" = "$(tr '\n' '\0' < .testdir/sums-1 | ./sha3-224sum)" rm -r .testdir |