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 B8D11431FBC for ; Sun, 26 Jan 2014 11:58:32 -0800 (PST) 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 bOIso1nFcY-J for ; Sun, 26 Jan 2014 11:58:26 -0800 (PST) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 42D8E431FC2 for ; Sun, 26 Jan 2014 11:58:26 -0800 (PST) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id B71BA100051; Sun, 26 Jan 2014 21:58:21 +0200 (EET) From: Tomi Ollila 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.17+55~g4397960 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain 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:58:32 -0000 On Sun, Jan 26 2014, Jani Nikula wrote: > This does not cover all the possible paths notmuch new could output > stuff, but it's better than nothing. > --- LGTM. Tomi > 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