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/du | |
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/du')
-rwxr-xr-x | tests/du/2g | 2 | ||||
-rwxr-xr-x | tests/du/8gb | 2 | ||||
-rwxr-xr-x | tests/du/basic | 2 | ||||
-rwxr-xr-x | tests/du/deref | 2 | ||||
-rwxr-xr-x | tests/du/deref-args | 2 | ||||
-rwxr-xr-x | tests/du/exclude | 2 | ||||
-rwxr-xr-x | tests/du/fd-leak | 2 | ||||
-rwxr-xr-x | tests/du/hard-link | 2 | ||||
-rwxr-xr-x | tests/du/inacc-dest | 2 | ||||
-rwxr-xr-x | tests/du/inacc-dir | 2 | ||||
-rwxr-xr-x | tests/du/inaccessible-cwd | 2 | ||||
-rwxr-xr-x | tests/du/long-from-unreadable | 2 | ||||
-rwxr-xr-x | tests/du/long-sloop | 2 | ||||
-rwxr-xr-x | tests/du/no-deref | 2 | ||||
-rwxr-xr-x | tests/du/no-x | 2 | ||||
-rwxr-xr-x | tests/du/one-file-system | 2 | ||||
-rwxr-xr-x | tests/du/restore-wd | 2 | ||||
-rwxr-xr-x | tests/du/slash | 2 | ||||
-rwxr-xr-x | tests/du/slink | 2 | ||||
-rwxr-xr-x | tests/du/trailing-slash | 2 | ||||
-rwxr-xr-x | tests/du/two-args | 2 |
21 files changed, 21 insertions, 21 deletions
diff --git a/tests/du/2g b/tests/du/2g index 6a7463c02..44592f942 100755 --- a/tests/du/2g +++ b/tests/du/2g @@ -70,4 +70,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/8gb b/tests/du/8gb index 49989d1f2..bdeeb070f 100755 --- a/tests/du/8gb +++ b/tests/du/8gb @@ -55,4 +55,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/basic b/tests/du/basic index 837ec92d5..94e62a838 100755 --- a/tests/du/basic +++ b/tests/du/basic @@ -91,4 +91,4 @@ EOF compare out exp || fail=1 fi -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/deref b/tests/du/deref index facdf426b..08606c0e3 100755 --- a/tests/du/deref +++ b/tests/du/deref @@ -34,4 +34,4 @@ fail=0 # du: `b': No such file or directory du -sD slink b > /dev/null 2>&1 || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/deref-args b/tests/du/deref-args index 02bdf7d55..ee5499ccf 100755 --- a/tests/du/deref-args +++ b/tests/du/deref-args @@ -50,4 +50,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/exclude b/tests/du/exclude index 1e32b60f3..e6fd68f48 100755 --- a/tests/du/exclude +++ b/tests/du/exclude @@ -60,4 +60,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/fd-leak b/tests/du/fd-leak index 14df938d3..a35ee24b8 100755 --- a/tests/du/fd-leak +++ b/tests/du/fd-leak @@ -45,4 +45,4 @@ fail=0 # With coreutils-5.0, this would fail due to a file descriptor leak. du $f > out || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/hard-link b/tests/du/hard-link index f4fdf2616..d58adbe44 100755 --- a/tests/du/hard-link +++ b/tests/du/hard-link @@ -50,4 +50,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/inacc-dest b/tests/du/inacc-dest index b0ea4d677..4f66f8be2 100755 --- a/tests/du/inacc-dest +++ b/tests/du/inacc-dest @@ -58,4 +58,4 @@ sed 's,cannot access,cannot read directory,' out > t && mv t out compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/inacc-dir b/tests/du/inacc-dir index 3b5fa5088..f3b0a46c6 100755 --- a/tests/du/inacc-dir +++ b/tests/du/inacc-dir @@ -44,4 +44,4 @@ du -k a > out 2> /dev/null && fail=1 compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/inaccessible-cwd b/tests/du/inaccessible-cwd index 70e83a1f9..9ee647838 100755 --- a/tests/du/inaccessible-cwd +++ b/tests/du/inaccessible-cwd @@ -37,4 +37,4 @@ fail=0 du "$cwd/a" > /dev/null || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/long-from-unreadable b/tests/du/long-from-unreadable index fdaf91ab4..5d9ce7c8e 100755 --- a/tests/du/long-from-unreadable +++ b/tests/du/long-from-unreadable @@ -68,4 +68,4 @@ chmod 0 . || framework_failure fail=0 du -s "$cwd/$dir" > /dev/null || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/long-sloop b/tests/du/long-sloop index 31aac1fe5..5d430252e 100755 --- a/tests/du/long-sloop +++ b/tests/du/long-sloop @@ -74,4 +74,4 @@ echo "du: cannot access: $too_many" > exp || fail=1 compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/no-deref b/tests/du/no-deref index 8d8bc6c68..d1ce5931d 100755 --- a/tests/du/no-deref +++ b/tests/du/no-deref @@ -35,4 +35,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/no-x b/tests/du/no-x index 5569b5d19..b4d6fad77 100755 --- a/tests/du/no-x +++ b/tests/du/no-x @@ -51,4 +51,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/one-file-system b/tests/du/one-file-system index 82081c6da..e944d1d06 100755 --- a/tests/du/one-file-system +++ b/tests/du/one-file-system @@ -42,4 +42,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/restore-wd b/tests/du/restore-wd index b716b4112..07c648c37 100755 --- a/tests/du/restore-wd +++ b/tests/du/restore-wd @@ -33,4 +33,4 @@ fail=0 du a b > out || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/slash b/tests/du/slash index d433a9235..c2d2cc382 100755 --- a/tests/du/slash +++ b/tests/du/slash @@ -35,4 +35,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/slink b/tests/du/slink index 588c4df32..5bf0349cb 100755 --- a/tests/du/slink +++ b/tests/du/slink @@ -59,4 +59,4 @@ du -a $symlinks > out || fail=1 # Require that at least one of these symlinks has a non-zero size. grep '^[1-9]' out > /dev/null || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/trailing-slash b/tests/du/trailing-slash index 92de5d45c..296ad7d4e 100755 --- a/tests/du/trailing-slash +++ b/tests/du/trailing-slash @@ -49,4 +49,4 @@ EOF compare out exp || fail=1 -(exit $fail); exit $fail +Exit $fail diff --git a/tests/du/two-args b/tests/du/two-args index 2b25bf535..b5d67b4b8 100755 --- a/tests/du/two-args +++ b/tests/du/two-args @@ -42,4 +42,4 @@ du $t/1 $t/2 > /dev/null || fail=1 du . $t > /dev/null || fail=1 du .. $t > /dev/null || fail=1 -(exit $fail); exit $fail +Exit $fail |