diff options
author | Jim Meyering <jim@meyering.net> | 2002-07-19 21:35:48 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2002-07-19 21:35:48 +0000 |
commit | b6389794e249151e047e6a5e9900685d944fa80a (patch) | |
tree | c68b6299400bf9112a6f8874b1bf10b4b5ceffe5 /tests | |
parent | 29c8739e953eed973abbb68464554454dfeca4be (diff) | |
download | coreutils-b6389794e249151e047e6a5e9900685d944fa80a.tar.xz |
Don't expect `ARGV_0=$0 exec ...' to work.
It doesn't work with /bin/sh of Solaris5.6.
Use an explicit `export ARGV_0' instead.
[comparing actual and expected output]: Don't match the entire line,
but rather just the `rm: cannot remove `$dir/$f':' part.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/rm/fail-eperm | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm index b1293cd77..7fa9c96f7 100755 --- a/tests/rm/fail-eperm +++ b/tests/rm/fail-eperm @@ -13,7 +13,10 @@ case "$PERL" in exit 77 ;; esac -ARGV_0=$0 exec $PERL -w -- - << \EOP +ARGV_0=$0 +export ARGV_0 + +exec $PERL -w -- - << \EOP require 5.003; use strict; @@ -71,11 +74,11 @@ foreach my $dir (@dir_list) or die "$ME: unexpected exit status from `$cmd';\n" . " got $status, expected 1\n"; - my $exp = "rm: cannot remove `$dir/$f': Operation not permitted\n"; - $line eq $exp + my $exp = "rm: cannot remove `$dir/$f':"; + $line =~ /^$exp/ or die "$ME: unexpected dignostic from `$cmd';\n" . " got $line" - . " expected $exp"; + . " expected $exp ...\n"; last; } |