From bbb82c231a255aee71a8c7f4263bb5859ab0c47a Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 16 Feb 2008 22:57:15 +0100 Subject: 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. --- tests/Coreutils.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tests/Coreutils.pm') 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); -- cgit v1.2.3