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