diff options
author | Jim Meyering <meyering@redhat.com> | 2008-09-07 10:31:27 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2008-09-10 13:20:10 +0200 |
commit | 68561594ca022703e255b3ef5686f176317e5fd4 (patch) | |
tree | 2bb17f465ad51bb9bf212b871a95b877e558d2e0 /tests/rm | |
parent | 22e5102f1961c5552d20c3791cbc99b6b001e83f (diff) | |
download | coreutils-68561594ca022703e255b3ef5686f176317e5fd4.tar.xz |
tests: use "Exit $fail", not (exit $fail); exit $fail
* tests/test-lib.sh (Exit): New function by Ralf Wildenhues in automake
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=20594c08f63
* tests/**: Convert all uses:
This restrictive change converted the vast majority:
git grep -l '^(exit \$fail); exit \$fail$' \
| xargs perl -pi -e 's/'^\(exit \$fail\); exit \$fail$/Exit \$fail/'
And this did the rest, plus a few undesirable ones, so I manually
backed out the changes to ChangeLog-* and build-aux/check.mk:
git grep -l -E '\(exit [^)]+\); exit ' \
| xargs perl -pi -e 's/\(exit (.+?)\); exit \1/Exit $1/'
Diffstat (limited to 'tests/rm')
37 files changed, 37 insertions, 37 deletions
diff --git a/tests/rm/cycle b/tests/rm/cycle index 4c9f04d03..20522a052 100755 --- a/tests/rm/cycle +++ b/tests/rm/cycle @@ -38,4 +38,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/dangling-symlink b/tests/rm/dangling-symlink index 7581be22f..189bafcfc 100755 --- a/tests/rm/dangling-symlink +++ b/tests/rm/dangling-symlink @@ -44,4 +44,4 @@ ls -l symlink > /dev/null 2>&1 && fail=1 kill $pid > /dev/null 2>&1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/deep-1 b/tests/rm/deep-1 index 34e9e1919..c16967880 100755 --- a/tests/rm/deep-1 +++ b/tests/rm/deep-1 @@ -55,4 +55,4 @@ rm -r $t || fail=1 # Make sure all of $t was deleted. test -d $t && fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/deep-2 b/tests/rm/deep-2 index ed84c66ea..f01a79efc 100755 --- a/tests/rm/deep-2 +++ b/tests/rm/deep-2 @@ -50,4 +50,4 @@ test -s out && fail=1 # the directory must have been removed test -d x && fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/dir-no-w b/tests/rm/dir-no-w index 35ab1852d..d5317d7b3 100755 --- a/tests/rm/dir-no-w +++ b/tests/rm/dir-no-w @@ -44,4 +44,4 @@ rm -f out-t compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/dir-nonrecur b/tests/rm/dir-nonrecur index 064ef5d43..1d06b4438 100755 --- a/tests/rm/dir-nonrecur +++ b/tests/rm/dir-nonrecur @@ -36,4 +36,4 @@ EOF # Before coreutils-5.93 this test would fail on Solaris 9 and newer. compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/dot-rel b/tests/rm/dot-rel index 0d0e1a1de..6a3ac5105 100755 --- a/tests/rm/dot-rel +++ b/tests/rm/dot-rel @@ -31,4 +31,4 @@ fail=0 rm -r a b || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/empty-inacc b/tests/rm/empty-inacc index e89d103f2..67af8753e 100755 --- a/tests/rm/empty-inacc +++ b/tests/rm/empty-inacc @@ -40,4 +40,4 @@ test -d inacc && fail=1 rm -rf a || fail=1 test -d a && fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/f-1 b/tests/rm/f-1 index acd241a20..fa008068f 100755 --- a/tests/rm/f-1 +++ b/tests/rm/f-1 @@ -30,4 +30,4 @@ mkdir -p d || framework_failure fail=0 rm -f d/no-such-file || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/fail-2eperm b/tests/rm/fail-2eperm index 6cc66ef80..14654e999 100755 --- a/tests/rm/fail-2eperm +++ b/tests/rm/fail-2eperm @@ -54,4 +54,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/fail-eacces b/tests/rm/fail-eacces index 916b2577b..4722b0f61 100755 --- a/tests/rm/fail-eacces +++ b/tests/rm/fail-eacces @@ -56,4 +56,4 @@ rm: cannot remove `e/slink': Permission denied EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/hash b/tests/rm/hash index abb7ffd04..eaa384a76 100755 --- a/tests/rm/hash +++ b/tests/rm/hash @@ -39,4 +39,4 @@ fail=0 rm -r t || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/i-1 b/tests/rm/i-1 index d19ebeaec..1d4b1dced 100755 --- a/tests/rm/i-1 +++ b/tests/rm/i-1 @@ -44,4 +44,4 @@ test -f $t/a && fail=1 rm -rf $t -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/i-never b/tests/rm/i-never index 244054ab7..2bde9ecfa 100755 --- a/tests/rm/i-never +++ b/tests/rm/i-never @@ -35,4 +35,4 @@ rm --interactive=never f > out || fail=1 compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/i-no-r b/tests/rm/i-no-r index f028b6357..718b1495d 100755 --- a/tests/rm/i-no-r +++ b/tests/rm/i-no-r @@ -36,4 +36,4 @@ rm -i dir < y > /dev/null 2>&1 && fail=1 # The directory must remain. test -d dir || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/ignorable b/tests/rm/ignorable index 37e0150f4..7b38fb6fd 100755 --- a/tests/rm/ignorable +++ b/tests/rm/ignorable @@ -32,4 +32,4 @@ fail=0 # Example from Andreas Schwab. rm -f existing-non-dir/f > out 2>&1 || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/inaccessible b/tests/rm/inaccessible index 35cddc599..fc46b021f 100755 --- a/tests/rm/inaccessible +++ b/tests/rm/inaccessible @@ -57,4 +57,4 @@ sed 's/: The file access permissions.*/: Permission denied/'<out>o1;mv o1 out compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/interactive-always b/tests/rm/interactive-always index 382cc6ff1..88afd7554 100755 --- a/tests/rm/interactive-always +++ b/tests/rm/interactive-always @@ -91,4 +91,4 @@ EOF compare out expout || fail=1 compare err experr || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/interactive-once b/tests/rm/interactive-once index 6238f3fcf..159083281 100755 --- a/tests/rm/interactive-once +++ b/tests/rm/interactive-once @@ -111,4 +111,4 @@ EOF compare out expout || fail=1 compare err experr || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/ir-1 b/tests/rm/ir-1 index c3cdc0be8..c3cb8b327 100755 --- a/tests/rm/ir-1 +++ b/tests/rm/ir-1 @@ -61,4 +61,4 @@ case `echo $t/*` in *) fail=1 ;; esac -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/isatty b/tests/rm/isatty index 596887311..173458d50 100755 --- a/tests/rm/isatty +++ b/tests/rm/isatty @@ -56,4 +56,4 @@ echo x >> out compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/no-give-up b/tests/rm/no-give-up index b888296c8..c88642037 100755 --- a/tests/rm/no-give-up +++ b/tests/rm/no-give-up @@ -43,4 +43,4 @@ test -d d || fail=1 # f must have been removed. test -f d/f && fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/one-file-system b/tests/rm/one-file-system index 419ada201..2de7678dd 100755 --- a/tests/rm/one-file-system +++ b/tests/rm/one-file-system @@ -45,4 +45,4 @@ umount $t compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/r-1 b/tests/rm/r-1 index ec846fb8d..187b6642c 100755 --- a/tests/rm/r-1 +++ b/tests/rm/r-1 @@ -47,4 +47,4 @@ done # Compare expected and actual output. compare $test.E $test.O || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/r-2 b/tests/rm/r-2 index 0bf6756de..d9614ba92 100755 --- a/tests/rm/r-2 +++ b/tests/rm/r-2 @@ -48,4 +48,4 @@ fi # Compare expected and actual output. cmp t/E t/O || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/r-3 b/tests/rm/r-3 index 9c31d881f..e4d8dc961 100755 --- a/tests/rm/r-3 +++ b/tests/rm/r-3 @@ -50,4 +50,4 @@ fail=0 rm -rf t || fail=1 test -d t && fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/r-4 b/tests/rm/r-4 index 3d2107914..7cc84b61d 100755 --- a/tests/rm/r-4 +++ b/tests/rm/r-4 @@ -38,4 +38,4 @@ rm -fr d/../ 2>/dev/null && fail=1 test -f d/a || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/readdir-bug b/tests/rm/readdir-bug index 15dc74125..2d2e6ebbf 100755 --- a/tests/rm/readdir-bug +++ b/tests/rm/readdir-bug @@ -43,4 +43,4 @@ rm -rf b || fail=1 test -d b && fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/rm1 b/tests/rm/rm1 index 70bc0e8b4..116bd7bea 100755 --- a/tests/rm/rm1 +++ b/tests/rm/rm1 @@ -50,4 +50,4 @@ test -d b/a/p || fail=1 test -d b/c && fail=1 test -d b/d && fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/rm2 b/tests/rm/rm2 index 853f4e2ac..67402a823 100755 --- a/tests/rm/rm2 +++ b/tests/rm/rm2 @@ -57,4 +57,4 @@ test -d a/3 && fail=1 chmod u+x b test -d b/3 || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/rm3 b/tests/rm/rm3 index c5630a269..a64bd2797 100755 --- a/tests/rm/rm3 +++ b/tests/rm/rm3 @@ -75,4 +75,4 @@ compare out exp || fail=1 test -d z && fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/rm4 b/tests/rm/rm4 index 2fbf317a1..8642a9d23 100755 --- a/tests/rm/rm4 +++ b/tests/rm/rm4 @@ -33,4 +33,4 @@ rm dir > /dev/null 2>&1 && fail=1 test -d dir || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/rm5 b/tests/rm/rm5 index f54d640a0..e36f08dfa 100755 --- a/tests/rm/rm5 +++ b/tests/rm/rm5 @@ -54,4 +54,4 @@ test -d d && fail=1 compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/sunos-1 b/tests/rm/sunos-1 index ce1016e1f..010c93782 100755 --- a/tests/rm/sunos-1 +++ b/tests/rm/sunos-1 @@ -31,4 +31,4 @@ fi fail=0 rm -r '' > /dev/null 2>&1 && fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/unread2 b/tests/rm/unread2 index 005c4255c..615f24d8d 100755 --- a/tests/rm/unread2 +++ b/tests/rm/unread2 @@ -37,4 +37,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/unread3 b/tests/rm/unread3 index e79bd6003..db38f900f 100755 --- a/tests/rm/unread3 +++ b/tests/rm/unread3 @@ -45,4 +45,4 @@ test -d "$t/b" && fail=1 test -d "$t/d" && fail=1 test -d "$t/e" && fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/rm/v-slash b/tests/rm/v-slash index 3a9d5411a..71432e6d9 100755 --- a/tests/rm/v-slash +++ b/tests/rm/v-slash @@ -36,4 +36,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail |