From 1930dcfa0dae6bed28601b5c8d5259cdcf8d0d7b Mon Sep 17 00:00:00 2001 From: Pieter Praet Date: Wed, 22 Feb 2012 19:43:29 +0100 Subject: [PATCH] [PATCH v2 2/7] test: emacs: new tests "notmuch-show: {, un}collapse all messages in thread" --- 30/87fb26a4d43f69c18ebb3a528b9aa3c3a61362 | 203 ++++++++++++++++++++++ 1 file changed, 203 insertions(+) create mode 100644 30/87fb26a4d43f69c18ebb3a528b9aa3c3a61362 diff --git a/30/87fb26a4d43f69c18ebb3a528b9aa3c3a61362 b/30/87fb26a4d43f69c18ebb3a528b9aa3c3a61362 new file mode 100644 index 000000000..1a5d33aa3 --- /dev/null +++ b/30/87fb26a4d43f69c18ebb3a528b9aa3c3a61362 @@ -0,0 +1,203 @@ +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 34C44431FC2 + for ; Wed, 22 Feb 2012 10:45:57 -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 lNH9Ebpo2pOP for ; + Wed, 22 Feb 2012 10:45:55 -0800 (PST) +Received: from mail-we0-f181.google.com (mail-we0-f181.google.com + [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 686B5431FAE + for ; Wed, 22 Feb 2012 10:45:55 -0800 (PST) +Received: by werp13 with SMTP id p13so266664wer.26 + for ; Wed, 22 Feb 2012 10:45:54 -0800 (PST) +Received-SPF: pass (google.com: domain of pieter@praet.org designates + 10.180.80.8 as permitted sender) client-ip=10.180.80.8; +Authentication-Results: mr.google.com; + spf=pass (google.com: domain of pieter@praet.org + designates 10.180.80.8 as permitted sender) + smtp.mail=pieter@praet.org +Received: from mr.google.com ([10.180.80.8]) + by 10.180.80.8 with SMTP id n8mr38112571wix.14.1329936354277 (num_hops + = 1); Wed, 22 Feb 2012 10:45:54 -0800 (PST) +MIME-Version: 1.0 +Received: by 10.180.80.8 with SMTP id n8mr31571953wix.14.1329936354098; + Wed, 22 Feb 2012 10:45:54 -0800 (PST) +Received: from localhost ([109.131.181.26]) + by mx.google.com with ESMTPS id s8sm30939325wiz.8.2012.02.22.10.45.53 + (version=TLSv1/SSLv3 cipher=OTHER); + Wed, 22 Feb 2012 10:45:53 -0800 (PST) +From: Pieter Praet +To: Notmuch Mail +Subject: [PATCH v2 2/7] test: emacs: new tests "notmuch-show: {, + un}collapse all messages in thread" +Date: Wed, 22 Feb 2012 19:43:29 +0100 +Message-Id: <1329936214-30959-2-git-send-email-pieter@praet.org> +X-Mailer: git-send-email 1.7.8.1 +In-Reply-To: <1327469139-1968-1-git-send-email-pieter@praet.org> +References: <1327469139-1968-1-git-send-email-pieter@praet.org> +X-Gm-Message-State: + ALoCoQn6bfw2D7L8ZNJps5hTyWtLQEnVAm/l3aj9lUsrD86sCT1y+SpmE1T4GwfJQUlteNYTzUCx +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: Wed, 22 Feb 2012 18:45:57 -0000 + +* test/emacs: + + - New subtest "notmuch-show: collapse all messages in thread": + `notmuch-show-open-or-close-all' with prefix arg ("C-u M-RET") + collapses all messages in thread. + + - New subtest "notmuch-show: uncollapse all messages in thread": + `notmuch-show-open-or-close-all' without prefix arg ("M-RET") + uncollapses all messages in thread. +--- + test/emacs | 13 +++ + ...notmuch-show-thread-with-all-messages-collapsed | 4 + + ...tmuch-show-thread-with-all-messages-uncollapsed | 79 ++++++++++++++++++++ + 3 files changed, 96 insertions(+), 0 deletions(-) + create mode 100644 test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed + create mode 100644 test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed + +diff --git a/test/emacs b/test/emacs +index f9ea1c3..7d6e6ee 100755 +--- a/test/emacs ++++ b/test/emacs +@@ -408,6 +408,19 @@ test_emacs \ + (test-visible-output))' + test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-message-with-headers-hidden + ++test_begin_subtest "notmuch-show: collapse all messages in thread" ++test_emacs '(notmuch-show "id:f35dbb950911171435ieecd458o853c873e35f4be95@mail.gmail.com") ++ (let ((current-prefix-arg t)) ++ (notmuch-show-open-or-close-all) ++ (test-visible-output))' ++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-all-messages-collapsed ++ ++test_begin_subtest "notmuch-show: uncollapse all messages in thread" ++test_emacs '(notmuch-show "id:f35dbb950911171435ieecd458o853c873e35f4be95@mail.gmail.com") ++ (notmuch-show-open-or-close-all) ++ (test-visible-output)' ++test_expect_equal_file OUTPUT $EXPECTED/notmuch-show-thread-with-all-messages-uncollapsed ++ + test_begin_subtest "Stashing in notmuch-show" + add_message '[date]="Sat, 01 Jan 2000 12:00:00 -0000"' \ + '[from]="Some One "' \ +diff --git a/test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed +new file mode 100644 +index 0000000..73b0e60 +--- /dev/null ++++ b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-collapsed +@@ -0,0 +1,4 @@ ++Jan Janak (2009-11-17) (inbox) ++Subject: [notmuch] What a great idea! ++ Jan Janak (2009-11-17) (inbox) ++ Carl Worth (2009-11-18) (inbox unread) +diff --git a/test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed +new file mode 100644 +index 0000000..bd5598e +--- /dev/null ++++ b/test/emacs.expected-output/notmuch-show-thread-with-all-messages-uncollapsed +@@ -0,0 +1,79 @@ ++Jan Janak (2009-11-17) (inbox) ++Subject: [notmuch] What a great idea! ++To: notmuch@notmuchmail.org ++Date: Tue, 17 Nov 2009 23:35:30 +0100 ++ ++Hello, ++ ++First of all, notmuch is a wonderful idea, both the cmdline tool and ++the emacs interface! Thanks a lot for writing it, I was really excited ++when I read the announcement today. ++ ++Have you considered sending an announcement to the org-mode mailing list? ++http://org-mode.org ++ ++Various ways of searching/referencing emails from emacs were discussed ++there several times and none of them were as elegant as notmuch (not ++even close). Maybe notmuch would attract some of the developers ++there.. ++ ++ -- Jan ++ Jan Janak (2009-11-17) (inbox) ++ Subject: [notmuch] What a great idea! ++ To: notmuch@notmuchmail.org ++ Date: Tue, 17 Nov 2009 23:38:47 +0100 ++ ++ On Tue, Nov 17, 2009 at 11:35 PM, Jan Janak wrote: ++ > Hello, ++ > ++ > First of all, notmuch is a wonderful idea, both the cmdline tool and ++ [ 2 more citation lines. Click/Enter to show. ] ++ > ++ > Have you considered sending an announcement to the org-mode mailing list? ++ > http://org-mode.org ++ ++ Sorry, wrong URL, the correct one is: http://orgmode.org ++ ++ > Various ways of searching/referencing emails from emacs were discussed ++ > there several times and none of them were as elegant as notmuch (not ++ > even close). Maybe notmuch would attract some of the developers ++ > there.. ++ ++ -- Jan ++ Carl Worth (2009-11-18) (inbox unread) ++ Subject: [notmuch] What a great idea! ++ To: notmuch@notmuchmail.org ++ Date: Wed, 18 Nov 2009 02:49:52 -0800 ++ ++ On Tue, 17 Nov 2009 23:35:30 +0100, Jan Janak wrote: ++ > First of all, notmuch is a wonderful idea, both the cmdline tool and ++ > the emacs interface! Thanks a lot for writing it, I was really excited ++ > when I read the announcement today. ++ ++ Ah, here's where I planned a nice welcome. So welcome (again), Jan! :-) ++ ++ I've been having a lot of fun with notmuch already, (though there have ++ been some days of pain before it was functional enough and my ++ email-reply latency went way up). But regardless---I got through that, ++ and I'm able to work more efficiently with notmuch now than I could with ++ sup before. So I'm happy. ++ ++ And I'm delighted when other people find this interesting as well. ++ ++ > Have you considered sending an announcement to the org-mode mailing list? ++ > http://orgmode.org ++ ++ Thanks for the idea. I think I may have looked into org-mode years ago, ++ (when I was investigating planner-mode and various emacs "personal wiki" ++ systems for keeping random notes and what-not). ++ ++ > Various ways of searching/referencing emails from emacs were discussed ++ > there several times and none of them were as elegant as notmuch (not ++ > even close). Maybe notmuch would attract some of the developers ++ > there.. ++ ++ Yeah. I'll drop them a mail. Having a real emacs wizard on board would ++ be nice. (I'm afraid the elisp I've written so far for this project is ++ fairly grim.) ++ ++ -Carl +-- +1.7.8.1 + -- 2.26.2