From bba5a47651a4a09f745f7f996c3b22fc410fabef Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Wed, 25 Feb 2009 19:51:04 +0100 Subject: 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. --- tests/ls/color-clear-to-eol | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/ls') 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 -- cgit v1.2.3-54-g00ecf