Fix handling of broken tests.
authorAustin Clements <amdragon@MIT.EDU>
Wed, 17 Nov 2010 19:27:20 +0000 (14:27 -0500)
committerCarl Worth <cworth@cworth.org>
Wed, 8 Dec 2010 00:21:23 +0000 (16:21 -0800)
Make sure to close the subtest for test_expect_equal_failure, just
like in test_expect_equal.

test/test-lib.sh [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 04a4c14..da91de8
@@ -440,6 +440,8 @@ test_expect_equal ()
 
 test_expect_equal_failure ()
 {
+       exec 1>&6 2>&7          # Restore stdout and stderr
+       inside_subtest=
        test "$#" = 3 && { prereq=$1; shift; } || prereq=
        test "$#" = 2 ||
        error "bug in the test script: not 2 or 3 parameters to test_expect_equal"