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 34FA3429E26 for ; Sat, 8 Oct 2011 20:21:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[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 zrmw0xdKTC5A for ; Sat, 8 Oct 2011 20:21:31 -0700 (PDT) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id A5EBA431FB6 for ; Sat, 8 Oct 2011 20:21:31 -0700 (PDT) Received: from fire-doxen.imss.caltech.edu (localhost [127.0.0.1]) by fire-doxen-postvirus (Postfix) with ESMTP id 1C7BB32806D for ; Sat, 8 Oct 2011 20:21:29 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on fire-doxen by amavisd-new Received: from finestructure.net (washington.ligo-wa.caltech.edu [198.129.208.205]) (Authenticated sender: jrollins) by fire-doxen-submit (Postfix) with ESMTP id 1A51032807F for ; Sat, 8 Oct 2011 20:21:27 -0700 (PDT) Received: by finestructure.net (Postfix, from userid 1000) id 64032B5F; Sat, 8 Oct 2011 20:21:26 -0700 (PDT) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH] test: add two emacs tests for show mode refresh Date: Sat, 8 Oct 2011 20:21:26 -0700 Message-Id: <1318130486-23529-1-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.7.6.3 In-Reply-To: References: 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, 09 Oct 2011 03:21:32 -0000 The first test tests that the notmuch-show-refresh-view function produces the exact same output for an unmodified show buffer. This test should pass since the relevant functionality has already been applied. The second test tests show refresh for a show buffer that has been modified by navigation and message visibility toggling. Ideally refresh-view should preserve this state of the notmuch-show buffer. Unfortunately it currently does not, so this test is know to be broken and is marked as such. --- test/emacs | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/test/emacs b/test/emacs index c88e5ac..6d9cfd9 100755 --- a/test/emacs +++ b/test/emacs @@ -367,4 +367,22 @@ test_emacs "(notmuch-show \"id:$id\") \ (test-visible-output \"EXPECTED\")" test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "Refresh show buffer" +test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com") + (test-visible-output "EXPECTED") + (notmuch-show-refresh-view) + (test-visible-output)' +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "Refresh modified show buffer" +test_subtest_known_broken +test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com") + (notmuch-show-toggle-message) + (notmuch-show-next-message) + (notmuch-show-toggle-message) + (test-visible-output "EXPECTED") + (notmuch-show-refresh-view) + (test-visible-output)' +test_expect_equal_file OUTPUT EXPECTED + test_done -- 1.7.6.3