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 970C8431FB6 for ; Fri, 14 Dec 2012 21:15:29 -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 hm3L9xhDKWmt for ; Fri, 14 Dec 2012 21:15:29 -0800 (PST) Received: from dmz-mailsec-scanner-4.mit.edu (DMZ-MAILSEC-SCANNER-4.MIT.EDU [18.9.25.15]) by olra.theworths.org (Postfix) with ESMTP id 618AA431FC0 for ; Fri, 14 Dec 2012 21:15:28 -0800 (PST) X-AuditID: 1209190f-b7fec6d00000090d-3a-50cc076f4ea9 Received: from mailhub-auth-1.mit.edu ( [18.9.21.35]) by dmz-mailsec-scanner-4.mit.edu (Symantec Messaging Gateway) with SMTP id FF.7B.02317.F670CC05; Sat, 15 Dec 2012 00:15:27 -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 qBF5FQ4c021591; Sat, 15 Dec 2012 00:15:26 -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 qBF5FOqc011447 (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-0002kW-AE; Sat, 15 Dec 2012 00:15:24 -0500 From: Austin Clements To: notmuch@notmuchmail.org Subject: [PATCH 5/7] test: Test show's handling of subprocess errors Date: Sat, 15 Dec 2012 00:15:11 -0500 Message-Id: <1355548513-10085-6-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+NgFtrDIsWRmVeSWpSXmKPExsUixCmqrJvPfibAYOt3MYvVc3ksrt+cyezA 5LFz1l12j2erbjEHMEVx2aSk5mSWpRbp2yVwZdx7/5Ct4AZ7xd95xQ2Ms9i6GDk5JARMJHae XMMCYYtJXLi3HijOxSEksI9RYu3rR8wQzgZGiTMfFrJAOI+YJKZu3w7lzGWU2HSqnRmkn01A Q2Lb/uWMILaIgLTEzruzWUFsZgFHic/7F4HtExZwkbjw7R+YzSKgKvF6+x2wel4BB4nNa75C 3aEo0f1sAlgNJ1Dvso/nwOJCQDVnX91lncDIv4CRYRWjbEpulW5uYmZOcWqybnFyYl5eapGu iV5uZoleakrpJkZwIEny72D8dlDpEKMAB6MSD++OiNMBQqyJZcWVuYcYJTmYlER5bzGcCRDi S8pPqcxILM6ILyrNSS0+xCjBwawkwiu2BaicNyWxsiq1KB8mJc3BoiTOezXlpr+QQHpiSWp2 ampBahFMVoaDQ0mCl50NaKhgUWp6akVaZk4JQpqJgxNkOA/QcC6QGt7igsTc4sx0iPwpRkUp cd4nrEAJAZBERmkeXC8s0l8xigO9IswrD9LOA0wScN2vgAYzAQ2Ou3QcZHBJIkJKqoExc1Xa RdOd0rYPkzMOpMtvfeuzQFp7hbRi0UP/T7ZOx/m/26XlP19xb7l1v3/AGsa7SbfeLlM6cIZd 7061tM5ukTdzXms8tIp8y6J6+FRJ8ReLEiaDhXJvxfvabkSXLb/99OzTGmN1/l6j8gC/2j3z NnNvuLH6/Yuksj5XZTOGM0Z6B5kqFvUrsRRnJBpqMRcVJwIADFVgiM8CAAA= 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:29 -0000 --- test/emacs-show | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/test/emacs-show b/test/emacs-show index b670abf..c67c6a4 100755 --- a/test/emacs-show +++ b/test/emacs-show @@ -163,4 +163,26 @@ EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "Show handles subprocess errors" +cat > notmuch_fail <&2 +exit 1 +EOF +chmod a+x notmuch_fail +test_emacs "(let ((notmuch-command \"$PWD/notmuch_fail\")) + (ignore-errors (notmuch-show \"*\")) + (notmuch-test-wait) + (test-output) + (with-current-buffer \"*Notmuch errors*\" + (test-output \"ERROR\")))" +test_expect_equal "$(cat OUTPUT ERROR)" "\ +Error invoking notmuch. /tmp/nmtest/tmp.emacs-show/notmuch_fail show --format=json --exclude=false ' * ' exited with status 1. +Error: +This is an error +Output: +This is output" + + test_done -- 1.7.10.4