summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-11-11 13:38:48 +0000
committerJim Meyering <jim@meyering.net>2002-11-11 13:38:48 +0000
commite8f4c08e145ded5455bc553eaead24c44a1119b8 (patch)
tree8bbf3568246fd4bce82db3260c16424979871408 /tests
parentf29777ab29d7e5fa83544187bc44e86439a555d9 (diff)
downloadcoreutils-e8f4c08e145ded5455bc553eaead24c44a1119b8.tar.xz
Ensure that `ls -dF --color symlink-to-dir' works properly.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/ls-2/tests10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/ls-2/tests b/tests/ls-2/tests
index 0657bdc7d..115695721 100755
--- a/tests/ls-2/tests
+++ b/tests/ls-2/tests
@@ -19,6 +19,8 @@ use strict;
# Turn off localisation of executable's ouput.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
+warn "PATH=$ENV{PATH}\n";
+
my $mkdir = {PRE => sub {mkdir 'd',0755 or die "d: $!\n"}};
my $rmdir = {POST => sub {rmdir 'd' or die "d: $!\n"}};
@@ -27,7 +29,9 @@ my $mkdir2 = {PRE => sub {mkdir 'd',0755 or die "d: $!\n";
my $rmdir2 = {POST => sub {rmdir 'd/e' or die "d/e: $!\n";
rmdir 'd' or die "d: $!\n" }};
-my $slink_d = {PRE => sub {symlink '/', 'd' or die "d: $!\n"}};
+my $slink_d = {PRE => sub {symlink '/', 'd' or die "d: $!\n";
+ $ENV{LS_COLORS}='ln=01;36:di=01;34:or=40;31;01'
+ }};
my $unlink_d = {POST => sub {unlink 'd' or die "d: $!\n"}};
my $q_bell = {IN => {"q\a" => ''}};
@@ -63,6 +67,10 @@ my @Tests =
['slinkdir-dFH', '-dFH d', {OUT => "d/\n"}, $slink_d, $unlink_d],
['slinkdir-dFL', '-dFL d', {OUT => "d/\n"}, $slink_d, $unlink_d],
+ ['sl-dF-color', '-dF --color=always d',
+ {OUT => "\e[0m\e[01;36md\e[0m\@\n\e[m"},
+ $slink_d, $unlink_d],
+
# From Stéphane Chazelas.
['no-a-isdir-b', 'no-dir d',
{OUT => "d:\n"},