diff options
author | Leo Izen <leo.izen@gmail.com> | 2017-10-15 14:18:53 -0400 |
---|---|---|
committer | Leo Izen <leo.izen@gmail.com> | 2017-10-15 14:18:53 -0400 |
commit | 5639afe8a055d36421ceeb843c8f6aadeec6f3b2 (patch) | |
tree | e7c1d5faec376ace6f22e95f6e6c473865976cf7 /test | |
parent | Fix dependencies in makefile (diff) | |
download | sha3sum-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.
Diffstat (limited to '')
-rwxr-xr-x | test | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 -' |