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 9A921431FBD for ; Sun, 26 Jan 2014 11:34:22 -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 ucVKkr3oNdPw for ; Sun, 26 Jan 2014 11:34:18 -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 D311F431FBC for ; Sun, 26 Jan 2014 11:34:17 -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 1W7VSt-0005KT-OZ; Sun, 26 Jan 2014 19:34:10 +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.71) (envelope-from ) id 1W7VS0-00017Q-FH; Sun, 26 Jan 2014 19:33:00 +0000 From: Mark Walters To: Jani Nikula , notmuch@notmuchmail.org Subject: Re: [PATCH] test: add basic tests for notmuch new --quiet option In-Reply-To: <1390762726-14075-1-git-send-email-jani@nikula.org> References: <1390762726-14075-1-git-send-email-jani@nikula.org> User-Agent: Notmuch/0.15.2+484~gfb59956 (http://notmuchmail.org) Emacs/23.4.1 (x86_64-pc-linux-gnu) Date: Sun, 26 Jan 2014 19:31:34 +0000 Message-ID: <8761p6a6ax.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-Geographic: According to ripencc, this message was delivered by a machine in Britain (UK) (GB). X-QM-SPAM-Info: Sender has good ham record. :) X-QM-Body-MD5: bf8a4633cb6632f06afd2ecbf810a2e1 (of first 20000 bytes) X-SpamAssassin-Score: 0.0 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 0.0 points. Summary of the scoring: * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider * (markwalters1009[at]gmail.com) * 0.0 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: Sun, 26 Jan 2014 19:34:22 -0000 LGTM +1. Best wishes Mark On Sun, 26 Jan 2014, Jani Nikula wrote: > This does not cover all the possible paths notmuch new could output > stuff, but it's better than nothing. > --- > test/T050-new.sh | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/test/T050-new.sh b/test/T050-new.sh > index f27423d..b7668ff 100755 > --- a/test/T050-new.sh > +++ b/test/T050-new.sh > @@ -248,4 +248,19 @@ ln -s i_do_not_exist "${MAIL_DIR}"/broken_link > output=$(NOTMUCH_NEW 2>&1) > test_expect_equal "$output" "No new mail." > > +test_begin_subtest "Quiet: No new mail." > +output=$(NOTMUCH_NEW --quiet) > +test_expect_equal "$output" "" > + > +test_begin_subtest "Quiet: new, removed and renamed messages." > +# new > +generate_message > +# deleted > +notmuch search --format=text0 --output=files --limit=1 '*' | xargs -0 rm > +# moved > +mkdir "${MAIL_DIR}"/moved_messages > +notmuch search --format=text0 --output=files --offset=1 --limit=1 '*' | xargs -0 -I {} mv {} "${MAIL_DIR}"/moved_messages > +output=$(NOTMUCH_NEW --quiet) > +test_expect_equal "$output" "" > + > test_done > -- > 1.8.5.2 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch