diff options
author | Jim Meyering <jim@meyering.net> | 2007-01-01 10:56:01 +0100 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2007-01-01 10:56:01 +0100 |
commit | 3b8560a63764595791245892cc8bd5877e0af508 (patch) | |
tree | 2e71639e2c472d64f75892ed52f70a075c120a16 /tests/rm/fail-eperm | |
parent | b5ef9617c4e4d2211984441c52d3318b5513517b (diff) | |
download | coreutils-3b8560a63764595791245892cc8bd5877e0af508.tar.xz |
* tests/rm/fail-eperm: Instead, simply transform the actual output diagnostic.
Test failure reported by Bob Proulx.
Diffstat (limited to 'tests/rm/fail-eperm')
-rwxr-xr-x | tests/rm/fail-eperm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/rm/fail-eperm b/tests/rm/fail-eperm index e2ce957eb..8801abacb 100755 --- a/tests/rm/fail-eperm +++ b/tests/rm/fail-eperm @@ -3,7 +3,7 @@ # Ensure that rm gives the expected diagnostic when failing to remove a file # owned by some other user in a directory with the sticky bit set. -# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2006, 2007 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -118,11 +118,16 @@ foreach my $dir (@dir_list) die "$ME: command `$cmd' died with signal $sig_num\n"; } - my $exp = "$rm: cannot remove `$target_file':"; + my $exp = "rm: cannot remove `$target_file':"; $line or die "$ME: no output from `$cmd';\n" . "expected something like `$exp ...'\n"; + # Transform the actual diagnostic so that it starts with "rm:". + # Depending on your system, it might be "rm:" already, or + # "../../src/rm:". + $line =~ s,^\Q$rm\E:,rm:,; + my $regex = quotemeta $exp; $line =~ /^$regex/ or die "$ME: unexpected diagnostic from `$cmd';\n" |