summaryrefslogtreecommitdiff
path: root/tests/ls
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/ls
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/ls')
-rwxr-xr-xtests/ls/capability2
-rwxr-xr-xtests/ls/color-dtype-dir2
-rwxr-xr-xtests/ls/dangle2
-rwxr-xr-xtests/ls/dired2
-rwxr-xr-xtests/ls/file-type2
-rwxr-xr-xtests/ls/follow-slink2
-rwxr-xr-xtests/ls/infloop2
-rwxr-xr-xtests/ls/inode2
-rwxr-xr-xtests/ls/m-option2
-rwxr-xr-xtests/ls/nameless-uid2
-rwxr-xr-xtests/ls/no-arg2
-rwxr-xr-xtests/ls/proc-selinux-segfault2
-rwxr-xr-xtests/ls/recursive2
-rwxr-xr-xtests/ls/rt-12
-rwxr-xr-xtests/ls/stat-dtype2
-rwxr-xr-xtests/ls/stat-failed2
-rwxr-xr-xtests/ls/stat-free-symlinks2
-rwxr-xr-xtests/ls/stat-vs-dirent2
-rwxr-xr-xtests/ls/symlink-slash2
-rwxr-xr-xtests/ls/x-option2
20 files changed, 20 insertions, 20 deletions
diff --git a/tests/ls/capability b/tests/ls/capability
index fcd3c2ad3..f064348ef 100755
--- a/tests/ls/capability
+++ b/tests/ls/capability
@@ -40,4 +40,4 @@ LS_COLORS="ca=$code" \
printf "\033[0m\033[${code}mtest\033[0m\n\033[m" > out_ok || fail=1
compare out out_ok || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/color-dtype-dir b/tests/ls/color-dtype-dir
index 37b40c459..6664d3bee 100755
--- a/tests/ls/color-dtype-dir
+++ b/tests/ls/color-dtype-dir
@@ -50,4 +50,4 @@ EOF
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/dangle b/tests/ls/dangle
index 942b45a8b..08a73b9f5 100755
--- a/tests/ls/dangle
+++ b/tests/ls/dangle
@@ -50,4 +50,4 @@ EOF
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/dired b/tests/ls/dired
index 3d96852c0..57b67b9c1 100755
--- a/tests/ls/dired
+++ b/tests/ls/dired
@@ -37,4 +37,4 @@ EOF
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/file-type b/tests/ls/file-type
index 1dfc303f4..01daeafeb 100755
--- a/tests/ls/file-type
+++ b/tests/ls/file-type
@@ -67,4 +67,4 @@ compare out3 exp3 || fail=1
ls --color=auto -F sub > out || fail=1
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/follow-slink b/tests/ls/follow-slink
index e0468de23..651ad8a50 100755
--- a/tests/ls/follow-slink
+++ b/tests/ls/follow-slink
@@ -63,4 +63,4 @@ EOF
compare out-L exp-L || fail=1
compare out-FLR-sub exp-FLR-sub || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/infloop b/tests/ls/infloop
index 6476e25c3..8ce145d93 100755
--- a/tests/ls/infloop
+++ b/tests/ls/infloop
@@ -44,4 +44,4 @@ EOF
# Make sure we don't get the "bad" output.
compare out bad > /dev/null 2>&1 && fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/inode b/tests/ls/inode
index dea2b2849..b5ddc8c9a 100755
--- a/tests/ls/inode
+++ b/tests/ls/inode
@@ -67,4 +67,4 @@ test $# = 4 || fail=1
# With -H, they must be different from inside a directory.
test "$1" != "$3" || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/m-option b/tests/ls/m-option
index 15495879e..cd0bc8a45 100755
--- a/tests/ls/m-option
+++ b/tests/ls/m-option
@@ -42,4 +42,4 @@ EOF
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/nameless-uid b/tests/ls/nameless-uid
index d5fa7f129..3cfc5880f 100755
--- a/tests/ls/nameless-uid
+++ b/tests/ls/nameless-uid
@@ -41,4 +41,4 @@ fail=0
set -- `ls -o f` || fail=1
test $3 = $nameless_uid || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/no-arg b/tests/ls/no-arg
index cd9dd380c..e3ccb9910 100755
--- a/tests/ls/no-arg
+++ b/tests/ls/no-arg
@@ -58,4 +58,4 @@ ls -R1 > out || fail=1
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/proc-selinux-segfault b/tests/ls/proc-selinux-segfault
index 1a31ece30..a37275788 100755
--- a/tests/ls/proc-selinux-segfault
+++ b/tests/ls/proc-selinux-segfault
@@ -29,4 +29,4 @@ test -r $f || f=.
fail=0
ls -l $f > out || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/recursive b/tests/ls/recursive
index 158b9ced3..e6f1e58b3 100755
--- a/tests/ls/recursive
+++ b/tests/ls/recursive
@@ -64,4 +64,4 @@ EOF
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/rt-1 b/tests/ls/rt-1
index 1a131761c..d4fd2ca11 100755
--- a/tests/ls/rt-1
+++ b/tests/ls/rt-1
@@ -50,4 +50,4 @@ a
EOF
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/stat-dtype b/tests/ls/stat-dtype
index 7e7dcb9c7..bca2bfc10 100755
--- a/tests/ls/stat-dtype
+++ b/tests/ls/stat-dtype
@@ -63,4 +63,4 @@ printf 'a2345/\tb/\n' > exp || fail=1
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/stat-failed b/tests/ls/stat-failed
index be9a78094..949fa24c6 100755
--- a/tests/ls/stat-failed
+++ b/tests/ls/stat-failed
@@ -54,4 +54,4 @@ EOF
sed 's/^ l/ ?/' out | compare - exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/stat-free-symlinks b/tests/ls/stat-free-symlinks
index be4d49048..e5ad6dcf1 100755
--- a/tests/ls/stat-free-symlinks
+++ b/tests/ls/stat-free-symlinks
@@ -52,4 +52,4 @@ grep '^stat("x"' err && fail=1
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/stat-vs-dirent b/tests/ls/stat-vs-dirent
index f105e2f3b..2c3b064db 100755
--- a/tests/ls/stat-vs-dirent
+++ b/tests/ls/stat-vs-dirent
@@ -64,4 +64,4 @@ while :; do
test $dev_ino = $root_dev_ino && break
done
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/symlink-slash b/tests/ls/symlink-slash
index 4315b063b..6b18bfe70 100755
--- a/tests/ls/symlink-slash
+++ b/tests/ls/symlink-slash
@@ -32,4 +32,4 @@ set `ls -l symlink/`
# Prior to fileutils-4.0k, the following would have output `... symlink -> dir'.
test "$*" = 'total 0' && : || fail=1
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/ls/x-option b/tests/ls/x-option
index b47960007..7f479d0c8 100755
--- a/tests/ls/x-option
+++ b/tests/ls/x-option
@@ -39,4 +39,4 @@ EOF
compare out exp || fail=1
-(exit $fail); exit $fail
+Exit $fail