]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: fix portability issue in new dd/ascii test
authorPádraig Brady <P@draigBrady.com>
Mon, 14 Jul 2014 01:19:31 +0000 (02:19 +0100)
committerPádraig Brady <P@draigBrady.com>
Mon, 14 Jul 2014 01:24:59 +0000 (02:24 +0100)
* 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.

tests/dd/ascii.sh

index da6e12814951db01786ab89b934b0da22f09c5be..7dc39cc91caba6e876bb8ec5dd6d845081dbaf0e 100755 (executable)
@@ -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_
 
 {