From 5639afe8a055d36421ceeb843c8f6aadeec6f3b2 Mon Sep 17 00:00:00 2001 From: Leo Izen Date: Sun, 15 Oct 2017 14:18:53 -0400 Subject: 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. --- test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') 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 -' -- cgit v1.2.3-70-g09d2