[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-vc-dwim] FYI, revamp tests
From: |
Jim Meyering |
Subject: |
[Bug-vc-dwim] FYI, revamp tests |
Date: |
Sat, 20 Jun 2009 11:37:58 +0200 |
I've just pushed these:
>From 59e540b25d355ebdaa3ad70593067cc5a76e7db9 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 19 Jun 2009 11:49:10 +0200
Subject: [PATCH 1/3] tests: revamp, require shell functions, etc.
move sourced require-* files into trap-setup as functions
* tests/trap-setup (require_bzr_, require_cvs_, require_hg_):
(require_git_): New functions.
* tests/require-bzr: Remove file.
* tests/require-cvs: Likewise.
* tests/require-hg: Likewise.
* tests/require-git: Likewise.
* tests/add-empty: Update users to invoke the function rather than
to source the file.
* tests/author: Likewise.
* tests/cl-but-no-diff: Likewise.
* tests/cl-other-user: Likewise.
* tests/git-log-summary: Likewise.
* tests/git-mv: Likewise.
* tests/leading-comment: Likewise.
* tests/no-star: Likewise.
* tests/subdir: Likewise.
* tests/subdir-cvs: Likewise.
* tests/subdir-middle: Likewise.
* tests/trap-setup: Likewise.
* tests/two-line-attr: Likewise.
* tests/two-vc: Likewise.
* tests/Makefile.am (EXTRA_DIST): Remove these:
require-bzr require-cvs require-git require-hg.
* gnulib: update to latest
---
ChangeLog | 38 +++++++++++++++++++++
gnulib | 2 +-
tests/Makefile.am | 4 --
tests/add-empty | 3 +-
tests/author | 3 +-
tests/cl-but-no-diff | 3 +-
tests/cl-other-user | 3 +-
tests/git-log-summary | 3 +-
tests/git-mv | 3 +-
tests/leading-comment | 3 +-
tests/multiple-chlogs | 2 +-
tests/no-star | 3 +-
tests/require-bzr | 18 ----------
tests/require-cvs | 12 -------
tests/require-git | 18 ----------
tests/require-hg | 18 ----------
tests/subdir | 3 +-
tests/subdir-cvs | 2 +-
tests/subdir-middle | 3 +-
tests/symlinked-changelog | 5 ++-
tests/t-vc-chlog | 2 +-
tests/trap-setup | 79 +++++++++++++++++++++++++++++++++++++++++++++
tests/two-line-attr | 3 +-
tests/two-vc | 5 ++-
24 files changed, 149 insertions(+), 89 deletions(-)
delete mode 100644 tests/require-bzr
delete mode 100644 tests/require-cvs
delete mode 100644 tests/require-git
delete mode 100644 tests/require-hg
diff --git a/ChangeLog b/ChangeLog
index 1b187d1..ba292dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,43 @@
+2009-06-20 Jim Meyering <address@hidden>
+
+ FIXME: to merge onto require-* removal changes
+ * tests/Makefile.am (EXTRA_DIST): Remove these:
+ require-bzr require-cvs require-git require-hg.
+
+2009-06-19 Jim Meyering <address@hidden>
+
+ tests: move require-* files into trap-setup as functions
+ * tests/trap-setup: (require_bzr_, require_cvs_): New functions.
+ (require_hg_, require_git_): New functions.
+ * tests/require-bzr: Remove file.
+ * tests/require-cvs: Likewise.
+ * tests/require-hg: Likewise.
+ * tests/require-git: Likewise.
+ * tests/add-empty: Update users to invoke the function rather than
+ to source the file.
+ * tests/author: Likewise.
+ * tests/cl-but-no-diff: Likewise.
+ * tests/cl-other-user: Likewise.
+ * tests/git-log-summary: Likewise.
+ * tests/git-mv: Likewise.
+ * tests/leading-comment: Likewise.
+ * tests/no-star: Likewise.
+ * tests/subdir: Likewise.
+ * tests/subdir-cvs: Likewise.
+ * tests/subdir-middle: Likewise.
+ * tests/trap-setup: Likewise.
+ * tests/two-line-attr: Likewise.
+ * tests/two-vc: Likewise.
+
2009-06-19 Jim Meyering <address@hidden>
+ * tests/require-git: Remove file.
+
+ build: revert part of an earlier change
+ * tests/Makefile.am: Do include *this* check.mk.
+
+ * tests/trap-setup (skip_test_): New function.
+
doc: update build-from-sources instructions
* README-hacking: Update.
diff --git a/gnulib b/gnulib
index 3ea7149..12f78b4 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 3ea7149254196fdcf06e81140c3d6c2910e9daad
+Subproject commit 12f78b4faa14cd2da952f865979843dee79fcf93
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 85005ac..e87e0ca 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -2,10 +2,6 @@
# This file may be modified and/or distributed without restriction.
EXTRA_DIST = $(TESTS) \
- require-bzr \
- require-cvs \
- require-git \
- require-hg \
trap-setup
TESTS = \
diff --git a/tests/add-empty b/tests/add-empty
index fd8a814..f89600b 100755
--- a/tests/add-empty
+++ b/tests/add-empty
@@ -6,9 +6,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp && cd $tmp \
|| framework_failure=1
diff --git a/tests/author b/tests/author
index 5091411..53971e7 100755
--- a/tests/author
+++ b/tests/author
@@ -6,9 +6,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp && cd $tmp \
|| framework_failure=1
diff --git a/tests/cl-but-no-diff b/tests/cl-but-no-diff
index 1b7c75c..d1380fa 100755
--- a/tests/cl-but-no-diff
+++ b/tests/cl-but-no-diff
@@ -7,9 +7,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp || framework_failure=1
cd $tmp || framework_failure=1
diff --git a/tests/cl-other-user b/tests/cl-other-user
index a6a8cba..a887a2e 100755
--- a/tests/cl-other-user
+++ b/tests/cl-other-user
@@ -6,9 +6,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp || framework_failure=1
cd $tmp || framework_failure=1
diff --git a/tests/git-log-summary b/tests/git-log-summary
index 232b1b3..cb5ae16 100755
--- a/tests/git-log-summary
+++ b/tests/git-log-summary
@@ -6,9 +6,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp && cd $tmp \
|| framework_failure=1
diff --git a/tests/git-mv b/tests/git-mv
index 4d1c1ce..ada71ce 100755
--- a/tests/git-mv
+++ b/tests/git-mv
@@ -8,9 +8,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp && cd $tmp \
|| framework_failure=1
diff --git a/tests/leading-comment b/tests/leading-comment
index 225c90a..e1fb5a8 100755
--- a/tests/leading-comment
+++ b/tests/leading-comment
@@ -6,9 +6,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp || framework_failure=1
cd $tmp || framework_failure=1
diff --git a/tests/multiple-chlogs b/tests/multiple-chlogs
index 574c482..918de9b 100755
--- a/tests/multiple-chlogs
+++ b/tests/multiple-chlogs
@@ -22,7 +22,7 @@ if ($diff -u empty empty) >/dev/null 2>&1; then
diff_u="$diff -u"
else
diff_u=$diff
- echo "$0: skipping this test, since $diff -u does not work" 1>&2
+ skip_test_ "$diff -u does not work"
(exit 77); exit 77
fi
diff --git a/tests/no-star b/tests/no-star
index 751d692..dc12f1e 100755
--- a/tests/no-star
+++ b/tests/no-star
@@ -6,9 +6,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp || framework_failure=1
cd $tmp || framework_failure=1
diff --git a/tests/require-bzr b/tests/require-bzr
deleted file mode 100644
index d2ef3b0..0000000
--- a/tests/require-bzr
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- sh -*-
-have_bzr=1
-bzr_version=`(bzr --version) 2> /dev/null | sed 1q`
-if test $? != 0; then
- have_bzr=0
-else
- case $bzr_version in
- "Bazaar (bzr) "1.[3-9]*) ;;
- "Bazaar (bzr) "[2-9]*) ;;
- *) have_bzr=0 ;;
- esac
-fi
-
-test $have_bzr = 0 &&
- {
- echo "$0: skipping this test, since you lack bzr" 1>&2
- (exit 77); exit 77
- }
diff --git a/tests/require-cvs b/tests/require-cvs
deleted file mode 100644
index 6cfaabc..0000000
--- a/tests/require-cvs
+++ /dev/null
@@ -1,12 +0,0 @@
-# -*- sh -*-
-have_cvs=1
-cvs_version=`(cvs --version) 2>/dev/null`
-if test $? != 0; then
- have_cvs=0
-fi
-
-test $have_cvs = 0 &&
- {
- echo "$0: skipping this test, since you lack cvs" 1>&2
- (exit 77); exit 77
- }
diff --git a/tests/require-git b/tests/require-git
deleted file mode 100644
index 9dd14d3..0000000
--- a/tests/require-git
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- sh -*-
-have_git=1
-git_version=`(git --version) 2>/dev/null`
-if test $? != 0; then
- have_git=0
-else
- case $git_version in
- "git version "1.[3-9]*) ;;
- "git version "2*) ;;
- *) have_git=0 ;;
- esac
-fi
-
-test $have_git = 0 &&
- {
- echo "$0: skipping this test, since you lack git" 1>&2
- (exit 77); exit 77
- }
diff --git a/tests/require-hg b/tests/require-hg
deleted file mode 100644
index 2c9c0f4..0000000
--- a/tests/require-hg
+++ /dev/null
@@ -1,18 +0,0 @@
-# -*- sh -*-
-have_hg=1
-hg_version=`(hg --version) 2> /dev/null | sed 1q`
-if test $? != 0; then
- have_hg=0
-else
- case $hg_version in
- "Mercurial Distributed SCM (version 0.9"*) ;;
- "Mercurial Distributed SCM (version "[a-f1-9]*) ;;
- *) have_hg=0 ;;
- esac
-fi
-
-test $have_hg = 0 &&
- {
- echo "$0: skipping this test, since you lack hg" 1>&2
- (exit 77); exit 77
- }
diff --git a/tests/subdir b/tests/subdir
index d335ced..d240f03 100755
--- a/tests/subdir
+++ b/tests/subdir
@@ -8,9 +8,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp || framework_failure=1
cd $tmp || framework_failure=1
diff --git a/tests/subdir-cvs b/tests/subdir-cvs
index cd1f82c..148ed1b 100755
--- a/tests/subdir-cvs
+++ b/tests/subdir-cvs
@@ -8,7 +8,7 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-cvs
+require_cvs_
. $srcdir/trap-setup
framework_failure=0
diff --git a/tests/subdir-middle b/tests/subdir-middle
index c6dd2b6..af8f20c 100755
--- a/tests/subdir-middle
+++ b/tests/subdir-middle
@@ -7,9 +7,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp || framework_failure=1
cd $tmp || framework_failure=1
diff --git a/tests/symlinked-changelog b/tests/symlinked-changelog
index 463acf1..8f0801c 100755
--- a/tests/symlinked-changelog
+++ b/tests/symlinked-changelog
@@ -6,10 +6,11 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-bzr
-. $srcdir/require-git
. $srcdir/trap-setup
+require_bzr_
+require_git_
+
framework_failure=0
mkdir -p $tmp || framework_failure=1
cd $tmp || framework_failure=1
diff --git a/tests/t-vc-chlog b/tests/t-vc-chlog
index 08bb9a2..368ec39 100755
--- a/tests/t-vc-chlog
+++ b/tests/t-vc-chlog
@@ -22,7 +22,7 @@ if ($diff -u empty empty) >/dev/null 2>&1; then
diff_u="$diff -u"
else
diff_u=$diff
- echo "$0: skipping this test, since $diff -u does not work" 1>&2
+ skip_test_ "$diff -u does not work"
(exit 77); exit 77
fi
diff --git a/tests/trap-setup b/tests/trap-setup
index 2363c4f..7649a6e 100644
--- a/tests/trap-setup
+++ b/tests/trap-setup
@@ -1,5 +1,84 @@
# -*- sh -*- common set-up code for each test
+# We use a trap below for cleanup. This requires us to go through
+# hoops to get the right exit status transported through the signal.
+# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function.
+Exit ()
+{
+ set +e
+ (exit $1)
+ exit $1
+}
+
+require_bzr_()
+{
+ have_bzr=1
+ bzr_version=`(bzr --version) 2> /dev/null | sed 1q`
+ if test $? != 0; then
+ have_bzr=0
+ else
+ case $bzr_version in
+ "Bazaar (bzr) "1.[3-9]*) ;;
+ "Bazaar (bzr) "1.1[0-9]*) ;;
+ "Bazaar (bzr) "[2-9]*) ;;
+ *) have_bzr=0 ;;
+ esac
+ fi
+
+ test $have_bzr = 0 &&
+ skip_test_ "this test requires bzr"
+}
+
+require_git_()
+{
+ have_git=1
+ git_version=`(git --version) 2>/dev/null`
+ if test $? != 0; then
+ have_git=0
+ else
+ case $git_version in
+ "git version "1.[3-9]*) ;;
+ "git version "2*) ;;
+ *) have_git=0 ;;
+ esac
+ fi
+
+ test $have_git = 0 &&
+ skip_test_ "this test requires git"
+}
+
+require_cvs_()
+{
+ have_cvs=1
+ cvs_version=`(cvs --version) 2>/dev/null`
+ if test $? != 0; then
+ have_cvs=0
+ fi
+
+ test $have_cvs = 0 &&
+ skip_test_ "this test requires cvs"
+}
+
+require_hg_()
+{
+ have_hg=1
+ hg_version=`(hg --version) 2> /dev/null | sed 1q`
+ if test $? != 0; then
+ have_hg=0
+ else
+ case $hg_version in
+ "Mercurial Distributed SCM (version 0.9"*) ;;
+ "Mercurial Distributed SCM (version "[a-f1-9]*) ;;
+ *) have_hg=0 ;;
+ esac
+ fi
+
+ test $have_hg = 0 &&
+ skip_test_ "this test requires hg"
+}
+
pwd=`pwd`
t0=`echo "$0"|sed 's,.*/,,'`.tmp; tmp=$t0/$$
diff --git a/tests/two-line-attr b/tests/two-line-attr
index fad986d..4f7c56a 100755
--- a/tests/two-line-attr
+++ b/tests/two-line-attr
@@ -6,9 +6,10 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
. $srcdir/trap-setup
+require_git_
+
framework_failure=0
mkdir -p $tmp || framework_failure=1
cd $tmp || framework_failure=1
diff --git a/tests/two-vc b/tests/two-vc
index a43e30d..399bf45 100755
--- a/tests/two-vc
+++ b/tests/two-vc
@@ -6,10 +6,11 @@ if test "$VERBOSE" = yes; then
vc-dwim --version
fi
-. $srcdir/require-git
-. $srcdir/require-cvs
. $srcdir/trap-setup
+require_git_
+require_cvs_
+
framework_failure=0
mkdir -p $tmp || framework_failure=1
cd $tmp || framework_failure=1
--
1.6.3.2.416.g04d0
>From 5e79e4e595c04c94f4e8e44b00a6b3ec5ee8259a Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 20 Jun 2009 11:23:34 +0200
Subject: [PATCH 2/3] tests: when skipping a test, say why
* tests/check.mk (TESTS_ENVIRONMENT): Redirect fd-9 to stderr.
Use "export".
* tests/trap-setup (skip_test_): New function.
Redirect first line to fd-9.
---
tests/check.mk | 17 ++++++++++-------
tests/trap-setup | 7 +++++++
2 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/tests/check.mk b/tests/check.mk
index adfb07e..c62bdd2 100644
--- a/tests/check.mk
+++ b/tests/check.mk
@@ -15,13 +15,16 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Propagate build-related Makefile variables to test scripts.
-TESTS_ENVIRONMENT = \
- top_srcdir=$(top_srcdir) \
- srcdir=$(srcdir) \
- PATCH="$(PATCH)" \
- PERL="$(PERL)" \
- perllibdir="`$(am__cd) $(top_srcdir) && pwd`" \
- PATH="$(VG_PATH_PREFIX)`pwd`/..$(PATH_SEPARATOR)$$PATH"
+TESTS_ENVIRONMENT = \
+ exec 9>&2; \
+ export \
+ top_srcdir=$(top_srcdir) \
+ srcdir=$(srcdir) \
+ PATCH="$(PATCH)" \
+ PERL="$(PERL)" \
+ perllibdir="`$(am__cd) $(top_srcdir) && pwd`" \
+ PATH="$(VG_PATH_PREFIX)`pwd`/..$(PATH_SEPARATOR)$$PATH" \
+ ; $(SHELL)
TEST_LOGS = $(TESTS:=.log)
diff --git a/tests/trap-setup b/tests/trap-setup
index 7649a6e..06ad85c 100644
--- a/tests/trap-setup
+++ b/tests/trap-setup
@@ -12,6 +12,13 @@ Exit ()
exit $1
}
+skip_test_()
+{
+ echo "$0: skipping test: $@" | head -1 1>&9
+ echo "$0: skipping test: $@" 1>&2
+ Exit 77
+}
+
require_bzr_()
{
have_bzr=1
--
1.6.3.2.416.g04d0
>From 5259cca2db111a979eb1662bbefbe6d6286cc0e5 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 20 Jun 2009 00:08:02 +0200
Subject: [PATCH 3/3] tests: use Exit consistently
---
cfg.mk | 5 ++---
tests/add-empty | 2 +-
tests/author | 2 +-
tests/cl-but-no-diff | 2 +-
tests/cl-other-user | 2 +-
tests/git-log-summary | 2 +-
tests/git-mv | 2 +-
tests/leading-comment | 2 +-
tests/multiple-chlogs | 2 ++
tests/no-star | 2 +-
tests/no-vc | 2 +-
tests/subdir | 2 +-
tests/subdir-cvs | 2 +-
tests/subdir-middle | 2 +-
tests/symlinked-changelog | 2 +-
tests/t-vc-chlog | 2 +-
tests/trap-setup | 2 +-
tests/two-line-attr | 2 +-
tests/two-vc | 2 +-
19 files changed, 21 insertions(+), 20 deletions(-)
diff --git a/cfg.mk b/cfg.mk
index 73f9519..793862c 100644
--- a/cfg.mk
+++ b/cfg.mk
@@ -33,9 +33,8 @@ gpg_key_ID = B9AB9A16
# at the top of the file for each `make distcheck' run.
local-checks-to-skip = strftime-check patch-check check-AUTHORS
-# The local directory containing the checked-out copy of gnulib used in this
-# release. Used solely to get gnulib's SHA1 for the "announcement" target.
-gnulib_dir = /gnulib
+# We define Exit in a different file.
+Exit_witness_file = tests/trap-setup
# Now that we have better tests, make this the default.
export VERBOSE = yes
diff --git a/tests/add-empty b/tests/add-empty
index f89600b..b44de15 100755
--- a/tests/add-empty
+++ b/tests/add-empty
@@ -58,4 +58,4 @@ vc-dwim ChangeLog > out
cmp out exp \
|| { diff out exp 2> /dev/null; false; }
-exit 0
+Exit 0
diff --git a/tests/author b/tests/author
index 53971e7..9a9bf0d 100755
--- a/tests/author
+++ b/tests/author
@@ -91,4 +91,4 @@ echo foo >> x
# Expect this to succeed
vc-dwim --author='X Y <address@hidden>' --commit > /dev/null
-exit 0
+Exit 0
diff --git a/tests/cl-but-no-diff b/tests/cl-but-no-diff
index d1380fa..7d3b64c 100755
--- a/tests/cl-but-no-diff
+++ b/tests/cl-but-no-diff
@@ -50,4 +50,4 @@ EOF
cmp out exp \
|| { diff out exp 2> /dev/null; false; }
-exit 0
+Exit 0
diff --git a/tests/cl-other-user b/tests/cl-other-user
index a887a2e..eda8ae4 100755
--- a/tests/cl-other-user
+++ b/tests/cl-other-user
@@ -56,4 +56,4 @@ EOF
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/git-log-summary b/tests/git-log-summary
index cb5ae16..b1f858a 100755
--- a/tests/git-log-summary
+++ b/tests/git-log-summary
@@ -47,4 +47,4 @@ vc-dwim --commit > /dev/null
git log -1 > out.t
tail -n3 out.t |sed 's/^ $//' > out
diff -u out exp || fail=1
-exit 0
+Exit 0
diff --git a/tests/git-mv b/tests/git-mv
index ada71ce..5ba29c0 100755
--- a/tests/git-mv
+++ b/tests/git-mv
@@ -71,4 +71,4 @@ else
false
fi
-exit 0
+Exit 0
diff --git a/tests/leading-comment b/tests/leading-comment
index e1fb5a8..9d813bf 100755
--- a/tests/leading-comment
+++ b/tests/leading-comment
@@ -52,4 +52,4 @@ EOF
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/multiple-chlogs b/tests/multiple-chlogs
index 918de9b..e082428 100755
--- a/tests/multiple-chlogs
+++ b/tests/multiple-chlogs
@@ -190,3 +190,5 @@ DATE NAME EMAIL
EOF
run_vc_chlog p2 --changelog ChangeLog --changelog sub/ChangeLog --changelog
sub/subb/ChangeLog
$diff_u expected stdout
+
+Exit 0
diff --git a/tests/no-star b/tests/no-star
index dc12f1e..7f71f27 100755
--- a/tests/no-star
+++ b/tests/no-star
@@ -51,4 +51,4 @@ EOF
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/no-vc b/tests/no-vc
index 4ec02ce..1f64933 100755
--- a/tests/no-vc
+++ b/tests/no-vc
@@ -35,4 +35,4 @@ EOF
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/subdir b/tests/subdir
index d240f03..6e9968a 100755
--- a/tests/subdir
+++ b/tests/subdir
@@ -52,4 +52,4 @@ EOF
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/subdir-cvs b/tests/subdir-cvs
index 148ed1b..0ba1061 100755
--- a/tests/subdir-cvs
+++ b/tests/subdir-cvs
@@ -67,4 +67,4 @@ EOF
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/subdir-middle b/tests/subdir-middle
index af8f20c..98be586 100755
--- a/tests/subdir-middle
+++ b/tests/subdir-middle
@@ -52,4 +52,4 @@ EOF
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/symlinked-changelog b/tests/symlinked-changelog
index 8f0801c..c490b7b 100755
--- a/tests/symlinked-changelog
+++ b/tests/symlinked-changelog
@@ -64,4 +64,4 @@ sed 's/^diff -r/diff --/' out > k; mv k out
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/t-vc-chlog b/tests/t-vc-chlog
index 368ec39..1497970 100755
--- a/tests/t-vc-chlog
+++ b/tests/t-vc-chlog
@@ -637,4 +637,4 @@ test "$VERBOSE" != yes || { cat stdout; cat stderr >&2; }
run_vc_chlog p11
$diff_u expected stdout
-exit 0
+Exit 0
diff --git a/tests/trap-setup b/tests/trap-setup
index 06ad85c..2b3b42b 100644
--- a/tests/trap-setup
+++ b/tests/trap-setup
@@ -5,7 +5,7 @@
# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
# sh inside this function.
-Exit ()
+Exit()
{
set +e
(exit $1)
diff --git a/tests/two-line-attr b/tests/two-line-attr
index 4f7c56a..fb5af99 100755
--- a/tests/two-line-attr
+++ b/tests/two-line-attr
@@ -49,4 +49,4 @@ EOF
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
diff --git a/tests/two-vc b/tests/two-vc
index 399bf45..b7b6304 100755
--- a/tests/two-vc
+++ b/tests/two-vc
@@ -48,4 +48,4 @@ EOF
cmp out exp || fail=1
test $fail = 1 && diff out exp 2> /dev/null
-(exit $fail); exit $fail
+Exit $fail
--
1.6.3.2.416.g04d0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-vc-dwim] FYI, revamp tests,
Jim Meyering <=