summaryrefslogtreecommitdiff
path: root/tests/ls
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-02-25 19:51:04 +0100
committerJim Meyering <meyering@redhat.com>2009-02-25 22:43:07 +0100
commitbba5a47651a4a09f745f7f996c3b22fc410fabef (patch)
tree1661c02758f6b106b00ff8d1d42b266eb1b6c273 /tests/ls
parentca4e48f822c41df7b9d269f8d3391915b6a40850 (diff)
downloadcoreutils-bba5a47651a4a09f745f7f996c3b22fc410fabef.tar.xz
tests: using printf with \e for ESC isn't portable
* tests/ls/color-clear-to-eol: Use \33, not \e for ascii ESC. This test failed when using the built-in printf of /bin/sh from NetBSD 1.6.
Diffstat (limited to 'tests/ls')
-rwxr-xr-xtests/ls/color-clear-to-eol5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/ls/color-clear-to-eol b/tests/ls/color-clear-to-eol
index ff9530d72..92cf8a8ca 100755
--- a/tests/ls/color-clear-to-eol
+++ b/tests/ls/color-clear-to-eol
@@ -26,9 +26,10 @@ fi
long_name=zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.foo
touch $long_name || framework_failure
+e='\33'
color_code='0;31;42'
-c_pre='\e[0m\e['"${color_code}m"
-c_post='\e[0m\e[K\n\e[m'
+c_pre="$e[0m$e[${color_code}m"
+c_post="$e[0m$e[K\n$e[m"
printf "$c_pre$long_name$c_post" > exp || framework_failure
fail=0