Remove suppression-related options.
[coreutils.git] / tests / rm / empty-name
blobc9db70a99213591ddc34aa3100778241f0057f33
1 #!/bin/sh
2 # Make sure that rm -r '' fails.
3 # On SunOS 4.1.3, running rm -r '' in a nonempty directory may
4 # actually remove files with names of entries in the current directory
5 # but relative to `/' rather than relative to the current directory.
7 : ${PERL=perl}
8 : ${srcdir=.}
10 $PERL -e 1 > /dev/null 2>&1 || {
11 echo 1>&2 "$0: configure didn't find a usable version of Perl," \
12 "so can't run this test"
13 exit 77
16 exec $PERL -w -I$srcdir/.. -MFetish -- - << \EOF
17 require 5.003;
18 use strict;
20 (my $program_name = $0) =~ s|.*/||;
22 # Turn off localisation of executable's ouput.
23 @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
25 my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
27 my @Tests =
29 # test-name options input expected-output
31 ['empty-name-1', "''", {EXIT => 1},
32 {ERR => "$prog: cannot remove `': No such file or directory\n"}],
35 my $save_temps = $ENV{SAVE_TEMPS};
36 my $verbose = $ENV{VERBOSE};
38 my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);
39 exit $fail;
40 EOF