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 AD227431FC0 for ; Sat, 15 Dec 2012 01:48:26 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -1.098 X-Spam-Level: X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001, NML_ADSP_CUSTOM_MED=1.2, 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 iqc-w521NQJG for ; Sat, 15 Dec 2012 01:48:26 -0800 (PST) Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id F028F431FBF for ; Sat, 15 Dec 2012 01:48:25 -0800 (PST) Received: from smtp.qmul.ac.uk ([138.37.6.40]) by mail2.qmul.ac.uk with esmtp (Exim 4.71) (envelope-from ) id 1TjoM4-0002VC-AV; Sat, 15 Dec 2012 09:48:24 +0000 Received: from 93-97-24-31.zone5.bethere.co.uk ([93.97.24.31] helo=localhost) by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from ) id 1TjoM3-0006pk-V5; Sat, 15 Dec 2012 09:48:24 +0000 From: Mark Walters To: Austin Clements , notmuch@notmuchmail.org Subject: Re: [PATCH 7/7] test: Test search's handling of subprocess errors In-Reply-To: <1355548513-10085-8-git-send-email-amdragon@mit.edu> References: <1355548513-10085-1-git-send-email-amdragon@mit.edu> <1355548513-10085-8-git-send-email-amdragon@mit.edu> User-Agent: Notmuch/0.14+155~g7edfdc3 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Sat, 15 Dec 2012 09:48:24 +0000 Message-ID: <87zk1ffxxz.fsf@qmul.ac.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Sender-Host-Address: 93.97.24.31 X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: cf2ff3170caefe69f53b2f32cd74b9a2 (of first 20000 bytes) X-SpamAssassin-Score: -1.8 X-SpamAssassin-SpamBar: - X-SpamAssassin-Report: The QM spam filters have analysed this message to determine if it is spam. We require at least 5.0 points to mark a message as spam. This message scored -1.8 points. Summary of the scoring: * -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, * medium trust * [138.37.6.40 listed in list.dnswl.org] * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * 0.5 AWL AWL: From: address is in the auto white-list X-QM-Scan-Virus: ClamAV says the message is clean 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 09:48:26 -0000 On Sat, 15 Dec 2012, Austin Clements wrote: > --- > 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 < +#!/bin/sh > +echo This is output > +echo This is an error >&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." The filename above is hardcoded so fails for me, and the same for patch 5/7 (modulo this the tests would both pass) Best wishes Mark > + > + > test_done > -- > 1.7.10.4