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"
12 # See if we can create a filename that contains a newline.
13 # Be careful to do it in a subshell so that we can redirect the
14 # error output if it fails.
17 && filename_may_contain_newline=yes \
18 || filename_may_contain_newline=no
22 if test $filename_may_contain_newline = no; then
23 echo 1>&2 "$0: can't create newline-containing file name," \
24 "so can't run this test"
28 exec $PERL -w -I$srcdir/.. -MCoreutils -- - <<\EOF
32 (my $program_name = $0) =~ s|.*/||;
34 # Turn off localisation of executable's ouput.
35 @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
37 my $degenerate = "d41d8cd98f00b204e9800998ecf8427e";
42 ['newline', $t, {IN=> {"a\nb"=> ''}}, {OUT=>"\\$degenerate a\\nb\n"}],
45 my $save_temps = $ENV{DEBUG};
46 my $verbose = $ENV{VERBOSE};
48 my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
49 my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);