*** empty log message ***
[coreutils.git] / tests / dircolors / simple
blob99d772e1cf6351f084096baeed9a8972578108ad
1 #!/bin/sh
3 : ${PERL=perl}
4 : ${srcdir=.}
6 $PERL -e 1 > /dev/null 2>&1 || {
7 echo 1>&2 "$0: configure didn't find a usable version of Perl," \
8 "so can't run this test"
9 exit 77
12 exec $PERL -w -I$srcdir/.. -MFetish -- - <<\EOF
13 require 5.003;
14 use strict;
16 (my $program_name = $0) =~ s|.*/||;
18 # Turn off localisation of executable's ouput.
19 @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
21 my @Tests =
23 ['a', {IN => {k => "exec\n"}},
24 {ERR => "dircolors: k:1: invalid line; missing second token\n"},
25 {EXIT => 1}],
28 my $save_temps = $ENV{DEBUG};
29 my $verbose = $ENV{VERBOSE};
31 my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
32 my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
33 exit $fail;
34 EOF