aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Izen <leo.izen@gmail.com>2017-10-15 14:18:53 -0400
committerLeo Izen <leo.izen@gmail.com>2017-10-15 14:18:53 -0400
commit5639afe8a055d36421ceeb843c8f6aadeec6f3b2 (patch)
treee7c1d5faec376ace6f22e95f6e6c473865976cf7
parentFix dependencies in makefile (diff)
downloadsha3sum-5639afe8a055d36421ceeb843c8f6aadeec6f3b2.tar.gz
sha3sum-5639afe8a055d36421ceeb843c8f6aadeec6f3b2.tar.bz2
sha3sum-5639afe8a055d36421ceeb843c8f6aadeec6f3b2.tar.xz
test: use POSIX-compliant printf
The test shell script had previously used \x notation, which is not POSIX-compliant and therefore is "undefined behavior." In this case, the script will fail if /bin/sh is DASH or some other minimal shell. This commit replaces the hexadecimal \x notation with \ddd octal notation, which is strictly POSIX-compliant and will work in any POSIX shell located at /bin/sh.
-rwxr-xr-xtest2
1 files changed, 1 insertions, 1 deletions
diff --git a/test b/test
index 3442e0d..11caa5d 100755
--- a/test
+++ b/test
@@ -24,7 +24,7 @@ test "$(printf '' | ./keccak-512sum)" = '0EAB42DE4C3CEB9235FC91ACFFE746B29C29A8C
test "$(printf '' | ./sha3-224sum -u)" = '6B4E03423667DBB73B6E15454F0EB1ABD4597F9A1B078E3F5B5A6BC7 -'
test "$(printf '' | ./sha3-224sum -l)" = '6b4e03423667dbb73b6e15454f0eb1abd4597f9a1b078e3f5b5a6bc7 -'
-test "$(printf '' | ./sha3-224sum -b)" = "$(printf '\x6B\x4E\x03\x42\x36\x67\xDB\xB7\x3B\x6E\x15\x45\x4F\x0E\xB1\xAB\xD4\x59\x7F\x9A\x1B\x07\x8E\x3F\x5B\x5A\x6B\xC7')"
+test "$(printf '' | ./sha3-224sum -b)" = "$(printf '\153\116\003\102\066\147\333\267\073\156\025\105\117\016\261\253\324\131\177\232\033\007\216\077\133\132\153\307')"
test "$(printf '' | ./rawshake256sum -N 128)" = '3A1108D4A90A31B85A10BDCE77F4BFBD -'