summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/ls-misc15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/misc/ls-misc b/tests/misc/ls-misc
index 30eb06cb0..bcd64e34c 100755
--- a/tests/misc/ls-misc
+++ b/tests/misc/ls-misc
@@ -18,6 +18,7 @@
use strict;
(my $program_name = $0) =~ s|.*/||;
+my $prog = 'ls';
# Turn off localization of executable's output.
@ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
@@ -224,6 +225,18 @@ my @Tests =
{PRE => sub { mk_file @v_files }},
{POST => sub { unlink @v_files }},
],
+
+ # Test for the ls -1U bug fixed in coreutils-7.5.
+ # It is triggered only with -1U and with two or more arguments,
+ # at least one of which is a nonempty directory.
+ ['multi-arg-U1', '-U1 d no-such',
+ {OUT => "d:\nf\n"},
+ {ERR_SUBST=>'s/ch:.*/ch:/'},
+ {ERR => "$prog: cannot access no-such:\n"},
+ $mkdir_reg,
+ $rmdir_reg,
+ {EXIT => 2},
+ ],
);
# Start with an unset LS_COLORS environment variable.
@@ -232,8 +245,6 @@ delete $ENV{LS_COLORS};
my $save_temps = $ENV{SAVE_TEMPS};
my $verbose = $ENV{VERBOSE};
-my $prog = 'ls';
-
setuid_setup;
my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
$fail