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 56202431FC2 for ; Fri, 3 Oct 2014 14:19:53 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] 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 00Sk0PPnA4Ql for ; Fri, 3 Oct 2014 14:19:48 -0700 (PDT) Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 1D167431FC0 for ; Fri, 3 Oct 2014 14:19:41 -0700 (PDT) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1XaAGK-0000LV-Ni; Fri, 03 Oct 2014 18:19:40 -0300 Received: (nullmailer pid 21181 invoked by uid 1000); Fri, 03 Oct 2014 21:19:08 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [Patch v2.5 4/4] test/insert: check that indexing errors are accepted with --keep Date: Fri, 3 Oct 2014 23:19:00 +0200 Message-Id: <1412371140-21051-5-git-send-email-david@tethera.net> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1412371140-21051-1-git-send-email-david@tethera.net> References: <1412371140-21051-1-git-send-email-david@tethera.net> 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: Fri, 03 Oct 2014 21:19:53 -0000 This is overkill for the current code path, but should provide some robustness for future changes in error handling. --- test/T070-insert.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index be8060e..80a22c1 100755 --- a/test/T070-insert.sh +++ b/test/T070-insert.sh @@ -202,6 +202,11 @@ test_begin_subtest "error exit when add_message returns $code" gdb --batch-silent --return-child-result -x index-file-$code.gdb \ --args notmuch insert < $gen_msg_filename test_expect_equal $? 1 + +test_begin_subtest "success exit with --keep when add_message returns $code" +gdb --batch-silent --return-child-result -x index-file-$code.gdb \ + --args notmuch insert --keep < $gen_msg_filename +test_expect_equal $? 0 done test_done -- 2.1.0