summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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"},