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 2BCD5429E25 for ; Thu, 26 May 2011 14:38:16 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.799 X-Spam-Level: X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, 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 rdPDTOjO7MrC for ; Thu, 26 May 2011 14:38:15 -0700 (PDT) Received: from mail-fx0-f53.google.com (mail-fx0-f53.google.com [209.85.161.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 788C7431FB6 for ; Thu, 26 May 2011 14:38:15 -0700 (PDT) Received: by fxm8 with SMTP id 8so1052886fxm.26 for ; Thu, 26 May 2011 14:38:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references; bh=bptlxY+FsI41XGHJaNNRjeVbRcYA/LRxa6WTznlxCMM=; b=T401SmhafD3fnfqnZWwnHpnkilsqgF5urS15aAYNKNyEWo9ahS5ssqDIqc2HnXkoLo 8seWVby7JE+Dj9x8mRDhK8dGwX8iEgtvZWpGV4Hlf91mAk2siThvIwSeKMq8P+a+99zW Y+NLx/dgse1DGQS9tCAkiVBMk1tt0ba5Kj4+Y= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=DeoOgCZZ8Pppm0sFlsTVP+cAg/pVEJvNmIlll6HqDtkuoX3e8sHS5yQsZN4OanWpZz YOUpAT1vuV7HKdXj3DeHJ8mGKAfR3zUMvl5Cquu2yVhVMTvfnyH5EZ83A2s46nlanEuY +QIUgH7RabQ/FIgj5o8H5EJSTBK27+gfSiE/w= Received: by 10.223.32.142 with SMTP id c14mr1468604fad.59.1306445894079; Thu, 26 May 2011 14:38:14 -0700 (PDT) Received: from localhost ([91.144.186.21]) by mx.google.com with ESMTPS id y7sm446472fak.7.2011.05.26.14.38.12 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 26 May 2011 14:38:12 -0700 (PDT) From: Dmitry Kurochkin To: notmuch@notmuchmail.org Subject: [PATCH 1/2] test: add tests for hiding messages in notmuch-show view Date: Fri, 27 May 2011 01:38:34 +0400 Message-Id: <1306445915-9474-1-git-send-email-dmitry.kurochkin@gmail.com> X-Mailer: git-send-email 1.7.5.1 In-Reply-To: <1306361416-5019-1-git-send-email-dmitry.kurochkin@gmail.com> References: <1306361416-5019-1-git-send-email-dmitry.kurochkin@gmail.com> 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: Thu, 26 May 2011 21:38:16 -0000 --- test/emacs | 16 ++++++++++++++++ .../notmuch-show-thread-with-hidden-messages | 3 +++ 2 files changed, 19 insertions(+), 0 deletions(-) create mode 100644 test/emacs.expected-output/notmuch-show-thread-with-hidden-messages diff --git a/test/emacs b/test/emacs index ccf02af..7421650 100755 --- a/test/emacs +++ b/test/emacs @@ -152,4 +152,20 @@ output=$(test_emacs "(notmuch-show \"$maildir_storage_thread\") expected=$(cat $EXPECTED/notmuch-show-thread-maildir-storage) test_expect_equal "$output" "$expected" +test_begin_subtest "Hiding message in notmuch-show view" +output=$(test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com") + (notmuch-show-toggle-message) + (princ (visible-buffer-string))') +expected=$(cat $EXPECTED/notmuch-show-thread-with-hidden-messages) +test_expect_equal "$output" "$expected" + +test_begin_subtest "Hiding message with visible citation in notmuch-show view" +output=$(test_emacs '(notmuch-show "id:f35dbb950911171438k5df6eb56k77b6c0944e2e79ae@mail.gmail.com") + (search-forward "Click/Enter to show.") + (button-activate (button-at (point))) + (notmuch-show-toggle-message) + (princ (visible-buffer-string))') +expected=$(cat $EXPECTED/notmuch-show-thread-with-hidden-messages) +test_expect_equal "$output" "$expected" + test_done diff --git a/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages b/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages new file mode 100644 index 0000000..5df6606 --- /dev/null +++ b/test/emacs.expected-output/notmuch-show-thread-with-hidden-messages @@ -0,0 +1,3 @@ +Jan Janak (2009-11-17) (inbox unread) + Jan Janak (2009-11-17) (inbox) + Carl Worth (2009-11-18) (inbox unread) -- 1.7.5.1