aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Coreutils.pm
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-02-16 22:57:15 +0100
committerJim Meyering <meyering@redhat.com>2008-02-17 11:16:18 +0100
commitbbb82c231a255aee71a8c7f4263bb5859ab0c47a (patch)
tree5d413940d3929ac19e825bd586556bace7fb94f9 /tests/Coreutils.pm
parentAdjust dircolors to match ls.c. (diff)
downloadcoreutils-bbb82c231a255aee71a8c7f4263bb5859ab0c47a.tar.gz
coreutils-bbb82c231a255aee71a8c7f4263bb5859ab0c47a.zip
Expand "ls --color" tests to also use the dircolors defaults.
* tests/misc/ls-misc: Adjust this test so each is run twice. First, as usual, and the second time with LS_COLORS set using the default settings produced by running dircolors. * tests/Coreutils.pm: See below. This required some changes: - save and restore $ENV{LS_COLORS} for each individual test that requires a specific value. - Since this is the first test to call the run_tests command more than once, it has exposed that that function erroneously modifies the \@Tests array. Fix that in tests/Coreutils.pm.
Diffstat (limited to 'tests/Coreutils.pm')
-rw-r--r--tests/Coreutils.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/Coreutils.pm b/tests/Coreutils.pm
index e506cc810..7a5f8362c 100644
--- a/tests/Coreutils.pm
+++ b/tests/Coreutils.pm
@@ -1,7 +1,7 @@
package Coreutils;
# This is a testing framework.
-# Copyright (C) 1998, 2000-2002, 2004-2007 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000-2002, 2004-2008 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
@@ -263,9 +263,11 @@ sub run_tests ($$$$$)
my @junk_files;
my $fail = 0;
- foreach $t (@$t_spec)
+ foreach my $tt (@$t_spec)
{
my @post_compare;
+ my @dummy = @$tt;
+ my $t = \@dummy;
my $test_name = shift @$t;
my $expect = {};
my ($pre, $post);