diff options
author | Pádraig Brady <P@draigBrady.com> | 2014-07-14 02:19:31 +0100 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2014-07-14 02:24:59 +0100 |
commit | 39f79234a173c471ff20a0bb0e49cb47b5d96f3c (patch) | |
tree | 42f3665bd4c077774f99c3aacd77d91a3f9eb3aa | |
parent | 2419df4139e7ef90442bb3899ad9a4fc1c3c2ee3 (diff) | |
download | coreutils-39f79234a173c471ff20a0bb0e49cb47b5d96f3c.tar.xz |
tests: fix portability issue in new dd/ascii test
* tests/dd/ascii.sh: Quote so that '\\' is passed
to printf rather than a single '\', as that's not portable.
bash, dash, zsh and external solaris printf were seen to support
printf '\%03o' 1 2
while ksh, freebsh shell and external GNU printf need the more portable
printf '\\%03o' 1 2
Note we don't use env here to call the coreutils printf implementation,
as there are many printf calls, so relying on portable shell
implementations will be faster.
-rwxr-xr-x | tests/dd/ascii.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/dd/ascii.sh b/tests/dd/ascii.sh index da6e12814..7dc39cc91 100755 --- a/tests/dd/ascii.sh +++ b/tests/dd/ascii.sh @@ -22,7 +22,7 @@ print_ver_ dd { # Two lines, EBCDIC " A A" and " A ", followed by all the bytes in order. printf '\100\301\100\301\100\301\100\100' && - printf $(printf "\\%03o" $(seq 0 255 )); + printf $(printf '\\%03o' $(seq 0 255)); } >in || framework_failure_ { |