summaryrefslogtreecommitdiff
path: root/tests/ls/color-clear-to-eol
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2010-01-30 16:52:46 -0600
committerJim Meyering <meyering@redhat.com>2010-02-01 08:26:12 +0100
commit5d43617e8ad863ed041309edefd018fdcaa87038 (patch)
tree97b006c897443e5ff9dd599f95ae3d603c2fd342 /tests/ls/color-clear-to-eol
parent5d4952059fa0d68cfc09ca5f72e6b0124633c79b (diff)
downloadcoreutils-5d43617e8ad863ed041309edefd018fdcaa87038.tar.xz
ls --color: don't emit a final no-op escape sequence
* src/ls.c (main): With --color, avoid emitting the final color- resetting escape sequence when it would be a no-op. * tests/ls/color-clear-to-eol: Adjust expected output accordingly. * tests/ls/color-dtype-dir: Likewise. * tests/ls/multihardlink: Likewise. * tests/ls/stat-free-symlinks: Likewise. * tests/misc/ls-misc: Likewise. * NEWS (Changes in behavior): Mention it. C de-Avillez rebased and adapted four of the new sl-dangle* tests in tests/misc/ls-misc. Reported by Jim Avera in http://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/494663
Diffstat (limited to 'tests/ls/color-clear-to-eol')
-rwxr-xr-xtests/ls/color-clear-to-eol2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ls/color-clear-to-eol b/tests/ls/color-clear-to-eol
index 96944cb6d..1be68cab6 100755
--- a/tests/ls/color-clear-to-eol
+++ b/tests/ls/color-clear-to-eol
@@ -29,7 +29,7 @@ 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_post="$e[0m$e[K\n"
printf "$c_pre$long_name$c_post\n" > exp || framework_failure
env TERM=xterm COLUMNS=80 LS_COLORS="*.foo=$color_code" TIME_STYLE=+T \