diff options
-rw-r--r-- | tests/init.cfg | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/init.cfg b/tests/init.cfg index e7a23893..8c71008f 100644 --- a/tests/init.cfg +++ b/tests/init.cfg @@ -159,8 +159,10 @@ or use the shortcut target of the toplevel Makefile, # sequence of four-byte strings \xHH where each H is a hexadecimal byte. hex_printf_() { - printf $(printf '\\%o' \ - $(printf %s "$1"|sed 's,\\x\([0-9a-fA-F][0-9a-fA-F]\), 0x\1,g')) + local octal_fmt=$(printf '\\%o' \ + $(printf '%s\n' "$1" \ + | sed 's,\\x\([0-9abcdefABCDEF][0-9abcdefABCDEF]\), 0x\1,g')) + printf "$octal_fmt" } # Wrap tr so that it always runs in the C locale. |