summaryrefslogtreecommitdiff
path: root/tests/ls-2
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2007-04-07 20:46:27 +0200
committerJim Meyering <jim@meyering.net>2007-04-07 20:51:13 +0200
commit4d484fe09feb198a8129fea29b4db50891988f62 (patch)
tree8d88c2ee6f11bd212be8677830739294ebbc012f /tests/ls-2
parentd63623eb7cd6a086e52f58b02fecdd2c41b9e402 (diff)
downloadcoreutils-4d484fe09feb198a8129fea29b4db50891988f62.tar.xz
Add a test for, and document, today's fix.
* NEWS: Mention today's ls --color fix. * tests/ls-2/tests (sl-target): Add a test for today's fix. * THANKS: Add Kirk Kelsey.
Diffstat (limited to 'tests/ls-2')
-rwxr-xr-xtests/ls-2/tests14
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/ls-2/tests b/tests/ls-2/tests
index d0257a6a3..3f2fc1df7 100755
--- a/tests/ls-2/tests
+++ b/tests/ls-2/tests
@@ -1,8 +1,7 @@
#!/bin/sh
# -*- perl -*-
-# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
-# Software Foundation, Inc.
+# Copyright (C) 1998, 2000-2007 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -58,6 +57,13 @@ 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 $target = {PRE => sub {
+ mkdir 'd',0755 or die "d: $!\n";
+ symlink '.', 'd/X' or die "d/X: $!\n";
+ $ENV{LS_COLORS}='ln=target'
+ }};
+my $target2 = {POST => sub {unlink 'd/X' or die "d/X: $!\n";
+ rmdir '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'
}};
@@ -120,6 +126,10 @@ my @Tests =
{OUT => "\e[0m\e[01;36md\e[0m\@\n\e[m"},
$slink_d, $unlink_d],
+ # Test for a bug fixed in coreutils-6.10.
+ ['sl-target', '--color=always d',
+ {OUT => "\e[0m\e[01;34mX\e[0m\n\e[m"}, $target, $target2],
+
# Test for a bug that was introduced in coreutils-4.5.4; fixed in 4.5.5.
# To demonstrate it, the file in question (with executable bit set)
# must not be a command line argument.