Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 7B52C429E21 for ; Sun, 11 Sep 2011 16:12:07 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id taAMKUiEE45i for ; Sun, 11 Sep 2011 16:12:07 -0700 (PDT) Received: from tempo.its.unb.ca (tempo.its.unb.ca [131.202.1.21]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id E932A431FB6 for ; Sun, 11 Sep 2011 16:12:06 -0700 (PDT) Received: from zancas.localnet (fctnnbsc36w-156034073093.pppoe-dynamic.High-Speed.nb.bellaliant.net [156.34.73.93]) (authenticated bits=0) by tempo.its.unb.ca (8.13.8/8.13.8) with ESMTP id p8BNC08Q010964 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Sun, 11 Sep 2011 20:12:02 -0300 Received: from bremner by zancas.localnet with local (Exim 4.76) (envelope-from ) id 1R2tBv-0008PL-P7; Sun, 11 Sep 2011 20:11:59 -0300 From: david@tethera.net To: notmuch@notmuchmail.org Subject: [PATCH] test: reset known_broken status in test_expect_equal and test_expect_equal_file Date: Sun, 11 Sep 2011 20:11:54 -0300 Message-Id: <1315782714-32287-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1309752441-10651-3-git-send-email-dmitry.kurochkin@gmail.com> References: <1309752441-10651-3-git-send-email-dmitry.kurochkin@gmail.com> Cc: David Bremner X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Sep 2011 23:12:07 -0000 From: David Bremner Commit 4cc6727 introduced the library function test_subtest_known_broken which sets a variable test_subtest_known_broken_ . Unfortunately this variable is not reset if test_begin_subtest is not called before the next test_expect_success or test_expect_failure. This commit remedies that, under the assumption that exactly one test_expect_equal or test_expect_equal_file will follow a test_begin_subtest --- Any comments on this? I didn't follow a lot of the original discussions on the test API very closely. Mainly I want to know if the assumption at the end of the commit message seems reasonable. test/test-lib.sh | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/test/test-lib.sh b/test/test-lib.sh index 196ef49..3c2768c 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -460,6 +460,7 @@ test_expect_equal () test_failure_ "$test_subtest_name" "$(diff -u $testname.expected $testname.output)" fi fi + test_subtest_known_broken_= } test_expect_equal_file () @@ -483,6 +484,7 @@ test_expect_equal_file () test_failure_ "$test_subtest_name" "$(diff -u $testname.expected $testname.output)" fi fi + test_subtest_known_broken_= } NOTMUCH_NEW () -- 1.7.5.4