From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id A278B429E33 for ; Fri, 14 Dec 2012 21:15:57 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 kTBiMupSLMm3 for ; Fri, 14 Dec 2012 21:15:56 -0800 (PST) Received: from dmz-mailsec-scanner-1.mit.edu (DMZ-MAILSEC-SCANNER-1.MIT.EDU [18.9.25.12]) by olra.theworths.org (Postfix) with ESMTP id E8343431FC9 for ; Fri, 14 Dec 2012 21:15:37 -0800 (PST) X-AuditID: 1209190c-b7f886d000000936-8d-50cc0779dc65 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-1.mit.edu (Symantec Messaging Gateway) with SMTP id A3.02.02358.9770CC05; Sat, 15 Dec 2012 00:15:37 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-1.mit.edu (8.13.8/8.9.2) with ESMTP id qBF5FReo021592; Sat, 15 Dec 2012 00:15:27 -0500 Received: from drake.dyndns.org (209-6-116-242.c3-0.arl-ubr1.sbo-arl.ma.cable.rcn.com [209.6.116.242]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qBF5FOkl011449 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sat, 15 Dec 2012 00:15:26 -0500 (EST) Received: from amthrax by drake.dyndns.org with local (Exim 4.77) (envelope-from ) id 1Tjk5s-0002kc-DB; Sat, 15 Dec 2012 00:15:24 -0500 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 7/7] test: Test search's handling of subprocess errors Date: Sat, 15 Dec 2012 00:15:13 -0500 Message-Id: <1355548513-10085-8-git-send-email-amdragon@mit.edu> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1355548513-10085-1-git-send-email-amdragon@mit.edu> References: <1355548513-10085-1-git-send-email-amdragon@mit.edu> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrDIsWRmVeSWpSXmKPExsUixCmqrFvJfibA4OgdMYvVc3ksrt+cyezA 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZby9f4O54B5HxcKlO1kaGNvYuxg5OCQETCR+ XPToYuQEMsUkLtxbz9bFyMUhJLCPUWJz+0QWCGcDo8SRK/1MEM4jJomZFw6zQzhzGSVedb5g BulnE9CQ2LZ/OSOILSIgLbHz7mxWEJtZwFHi8/5FbCC2sICbxM0lbUwgNouAqsTBHfPB6nkF HCTOLjvLBnGHokT3swlgNidQ77KP51hAbCGQmld3WScw8i9gZFjFKJuSW6Wbm5iZU5yarFuc nJiXl1qka6iXm1mil5pSuokRHEiSPDsY3xxUOsQowMGoxMO7I+J0gBBrYllxZe4hRkkOJiVR 3lsMZwKE+JLyUyozEosz4otKc1KLDzFKcDArifCKbQEq501JrKxKLcqHSUlzsCiJ815Ouekv JJCeWJKanZpakFoEk5Xh4FCS4P3BBjRUsCg1PbUiLTOnBCHNxMEJMpwHaDhYDW9xQWJucWY6 RP4Uo6KUOO9VkIQASCKjNA+uFxbprxjFgV4R5o0GqeIBJgm47ldAg5mABsddOg4yuCQRISXV wOizT1nm+ZUdr+9a6Z9nuZ72+qKc43qpW5bJC1bPL5pUz/z8VeVd0wWFdyXvxEk8YVOr2p7z lv/oo95LmxxlA8y2+3MkFIVZr+wIsmzXE2d4OT35RJ7V9LQFWqzmpx7WpNYpbtC9+ur3Kb9z 9dqHXi1tYGqTjjd8qTq323GT5611ZwQl/LK50pVYijMSDbWYi4oTAdHYCG/PAgAA 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: Sat, 15 Dec 2012 05:15:58 -0000 --- test/emacs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/test/emacs b/test/emacs index 5403930..88b062c 100755 --- a/test/emacs +++ b/test/emacs @@ -853,4 +853,27 @@ test_expect_success "Rendering HTML mail with images" \ 'cat OUTPUT && grep -q smiley OUTPUT' +test_begin_subtest "Search handles subprocess errors" +cat > notmuch_fail <&2 +exit 1 +EOF +chmod a+x notmuch_fail +test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\")) + (notmuch-search \"tag:inbox\") + (notmuch-test-wait) + (test-output) + (with-current-buffer \"*Notmuch errors*\" + (test-output \"ERROR\")))" +test_expect_equal "$(cat OUTPUT ERROR)" "\ +Error: Unexpected output from notmuch search: +This is output +Error: Unexpected output from notmuch search: +This is an error +End of search results. +Error invoking notmuch. /tmp/nmtest/tmp.emacs/notmuch_fail search --format=json --sort=newest-first tag:inbox exited with status 1." + + test_done -- 1.7.10.4