1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-21 11:16:16 +02:00

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/'
This commit is contained in:
Jim Meyering
2008-09-07 10:31:27 +02:00
parent 22e5102f19
commit 68561594ca
300 changed files with 323 additions and 311 deletions

View File

@@ -27,4 +27,4 @@ fail=0
mkdir --parents "`pwd`/t" || fail=1
test -d t || fail=1
(exit $fail); exit $fail
Exit $fail

View File

@@ -27,4 +27,4 @@ fail=0
mkdir --parents "`pwd`/t/u" || fail=1
test -d t/u || fail=1
(exit $fail); exit $fail
Exit $fail

View File

@@ -52,4 +52,4 @@ b=`ls "$p/a" | tr -d '\n'`
# With coreutils-5.3.0, this would fail with $b=bu.
test "x$b" = xb || fail=1
(exit $fail); exit $fail
Exit $fail

View File

@@ -31,4 +31,4 @@ test -d d1 || fail=1
mkdir -p d2/.. || fail=1
test -d d2 || fail=1
(exit $fail); exit $fail
Exit $fail

View File

@@ -29,4 +29,4 @@ fail=0
mkdir -p slink/x || fail=1
test -d x || fail=1
(exit $fail); exit $fail
Exit $fail

View File

@@ -34,4 +34,4 @@ mkdir: created directory `foo/a/b/c'
mkdir: created directory `foo/a/b/c/d'
EOF
(exit $fail); exit $fail
Exit $fail

View File

@@ -53,4 +53,4 @@ p=`ls -ld a/b/c|cut -b-10`; case $p in drwx------);; *) fail=1;; esac
# `d's perms are determined by the -m argument.
p=`ls -ld a/b/c/d|cut -b-10`; case $p in $d_mode_str);; *) fail=1;; esac
(exit $fail); exit $fail
Exit $fail

View File

@@ -85,4 +85,4 @@ for p in empty -p; do
done
done
(exit $fail); exit $fail
Exit $fail

View File

@@ -56,4 +56,4 @@ for cmd_w_arg in 'mkdir dir' 'mknod b p' 'mkfifo f'; do
compare out exp || fail=1
done
(exit $fail); exit $fail
Exit $fail

View File

@@ -52,4 +52,4 @@ case "$mode" in
*) fail=1 ;;
esac
(exit $fail); exit $fail
Exit $fail

View File

@@ -33,4 +33,4 @@ test -d dir || fail=1
mkdir d2/ || fail=1
test -d d2 || fail=1
(exit $fail); exit $fail
Exit $fail

View File

@@ -54,4 +54,4 @@ mkdir -p mnt-ro/rw/sub || fail=1
umount /tmp/2
umount /tmp/1
(exit $fail); exit $fail
Exit $fail