summaryrefslogtreecommitdiff
path: root/tests/touch
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-09-07 10:31:27 +0200
committerJim Meyering <meyering@redhat.com>2008-09-10 13:20:10 +0200
commit68561594ca022703e255b3ef5686f176317e5fd4 (patch)
tree2bb17f465ad51bb9bf212b871a95b877e558d2e0 /tests/touch
parent22e5102f1961c5552d20c3791cbc99b6b001e83f (diff)
downloadcoreutils-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/touch')
-rwxr-xr-xtests/touch/dangling-symlink2
-rwxr-xr-xtests/touch/dir-12
-rwxr-xr-xtests/touch/empty-file2
-rwxr-xr-xtests/touch/fail-diag2
-rwxr-xr-xtests/touch/fifo2
-rwxr-xr-xtests/touch/no-create-missing2
-rwxr-xr-xtests/touch/no-rights2
-rwxr-xr-xtests/touch/not-owner2
-rwxr-xr-xtests/touch/now-owned-by-other2
-rwxr-xr-xtests/touch/obsolescent2
-rwxr-xr-xtests/touch/read-only2
-rwxr-xr-xtests/touch/relative2
12 files changed, 12 insertions, 12 deletions
diff --git a/tests/touch/dangling-symlink b/tests/touch/dangling-symlink
index aedb4afb2..add6f63f1 100755
--- a/tests/touch/dangling-symlink
+++ b/tests/touch/dangling-symlink
@@ -51,4 +51,4 @@ when operating on dangling symlinks.
esac
fi
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/dir-1 b/tests/touch/dir-1
index 34023072f..1698ab1ca 100755
--- a/tests/touch/dir-1
+++ b/tests/touch/dir-1
@@ -11,4 +11,4 @@ fi
fail=0
touch . || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/empty-file b/tests/touch/empty-file
index 0f42ba57e..9c11990dc 100755
--- a/tests/touch/empty-file
+++ b/tests/touch/empty-file
@@ -82,4 +82,4 @@ if test $fail != 0; then
EOF
fi
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/fail-diag b/tests/touch/fail-diag
index b8889121b..37814fd4d 100755
--- a/tests/touch/fail-diag
+++ b/tests/touch/fail-diag
@@ -38,4 +38,4 @@ EOF
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/fifo b/tests/touch/fifo
index 9cd2d0171..8152717ba 100755
--- a/tests/touch/fifo
+++ b/tests/touch/fifo
@@ -29,4 +29,4 @@ fail=0
touch fifo || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/no-create-missing b/tests/touch/no-create-missing
index be2d0dbf3..48c81d55d 100755
--- a/tests/touch/no-create-missing
+++ b/tests/touch/no-create-missing
@@ -41,4 +41,4 @@ if "$test" -w /dev/stdout >/dev/null &&
touch -ca - >&- 2> /dev/null || fail=1
fi
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/no-rights b/tests/touch/no-rights
index 7550bae5e..5a662b3df 100755
--- a/tests/touch/no-rights
+++ b/tests/touch/no-rights
@@ -42,4 +42,4 @@ test "$*" = "x t1 t2" || fail=1
# Also test the combination of --no-create and -a.
touch -a --no-create t1 || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/not-owner b/tests/touch/not-owner
index adcdaa87a..b0ad4ac59 100755
--- a/tests/touch/not-owner
+++ b/tests/touch/not-owner
@@ -54,4 +54,4 @@ test "$match" = 1 || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/now-owned-by-other b/tests/touch/now-owned-by-other
index 2c1faefef..123df8458 100755
--- a/tests/touch/now-owned-by-other
+++ b/tests/touch/now-owned-by-other
@@ -36,4 +36,4 @@ chmod g+x .
setuidgid $NON_ROOT_USERNAME env PATH="$PATH" touch -d now root-owned || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/obsolescent b/tests/touch/obsolescent
index 8b558777e..a5dcd24b6 100755
--- a/tests/touch/obsolescent
+++ b/tests/touch/obsolescent
@@ -43,4 +43,4 @@ y2000=0101000000
rm -f $y2000 file || fail=1
touch $y2000 file && test -f $y2000 && test -f file || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/read-only b/tests/touch/read-only
index e2338c51c..8b7ebd18f 100755
--- a/tests/touch/read-only
+++ b/tests/touch/read-only
@@ -33,4 +33,4 @@ touch read-only || fail=1
touch - 1< read-only 2> /dev/null && { test ! -f - || fail=1; }
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/touch/relative b/tests/touch/relative
index 7c1396f15..db31b16d0 100755
--- a/tests/touch/relative
+++ b/tests/touch/relative
@@ -40,4 +40,4 @@ EOF
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail