# HG changeset patch # User Bruno Haible # Date 1213225931 -7200 # Node ID 3a2bf9fb3efb5ae154c629aadbfe3bbfefeb21de # Parent 9a94025d64708e8ad5d921bbdd06a4c88fdc8885 Avoid a test failure when the test wants to skip itself. diff -r 9a94025d6470 -r 3a2bf9fb3efb ChangeLog --- a/ChangeLog Wed Jun 11 05:23:13 2008 -0700 +++ b/ChangeLog Thu Jun 12 01:12:11 2008 +0200 @@ -1,3 +1,9 @@ +2008-06-10 Bruno Haible + + * tests/test-vc-list-files-git.sh: Make double use of 'exit'. Needed + for $? to work inside the trap command, with various /bin/sh-s. + * tests/test-vc-list-files-cvs.sh: Likewise. + 2008-06-10 Bruno Haible * lib/acl-internal.h: Don't include gettext.h here. diff -r 9a94025d6470 -r 3a2bf9fb3efb tests/test-vc-list-files-cvs.sh --- a/tests/test-vc-list-files-cvs.sh Wed Jun 11 05:23:13 2008 -0700 +++ b/tests/test-vc-list-files-cvs.sh Thu Jun 12 01:12:11 2008 +0200 @@ -44,7 +44,8 @@ ok=0 mkdir $tmpdir && cd $tmpdir && # without cvs, skip the test - { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 || exit 77; } && + # The double use of 'exit' is needed for the reference to $? inside the trap. + { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 || { (exit 77); exit 77; }; } && mkdir w && cd w && mkdir d && touch d/a b c && diff -r 9a94025d6470 -r 3a2bf9fb3efb tests/test-vc-list-files-git.sh --- a/tests/test-vc-list-files-git.sh Wed Jun 11 05:23:13 2008 -0700 +++ b/tests/test-vc-list-files-git.sh Thu Jun 12 01:12:11 2008 +0200 @@ -31,7 +31,8 @@ fail=1 mkdir $tmpdir && cd $tmpdir && # without git, skip the test - { ( git init -q ) > /dev/null 2>&1 || exit 77; } && + # The double use of 'exit' is needed for the reference to $? inside the trap. + { ( git init -q ) > /dev/null 2>&1 || { (exit 77); exit 77; }; } && mkdir d && touch d/a b c && git add . > /dev/null &&