[PATCH 1/2] test: add broken test for long names in Emacs notmuch-hello view

Subject: [PATCH 1/2] test: add broken test for long names in Emacs notmuch-hello view

Date: Fri, 9 Mar 2012 11:34:52 +0400

To: notmuch@notmuchmail.org

Cc:

From: Dmitry Kurochkin


Currently, the column alignment in Emacs notmuch-hello is broken for
tags/queries with long names.
---
 test/emacs-hello                                   |    9 +++++++++
 .../emacs.expected-output/notmuch-hello-long-names |   18 ++++++++++++++++++
 2 files changed, 27 insertions(+), 0 deletions(-)
 create mode 100644 test/emacs.expected-output/notmuch-hello-long-names

diff --git a/test/emacs-hello b/test/emacs-hello
index b235e3a..9e5d045 100755
--- a/test/emacs-hello
+++ b/test/emacs-hello
@@ -44,4 +44,13 @@ test_emacs "(let ((notmuch-hello-sections
              (test-output))"
 test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-section-counts
 
+test_begin_subtest "Column alignment for tag/queries with long names"
+test_subtest_known_broken
+tag=a-very-long-tag # length carefully calculated for 80 characters window width
+notmuch tag +$tag '*'
+test_emacs '(notmuch-hello)
+            (test-output)'
+notmuch tag -$tag '*'
+test_expect_equal_file OUTPUT $EXPECTED/notmuch-hello-long-names
+
 test_done
diff --git a/test/emacs.expected-output/notmuch-hello-long-names b/test/emacs.expected-output/notmuch-hello-long-names
new file mode 100644
index 0000000..be6d2c5
--- /dev/null
+++ b/test/emacs.expected-output/notmuch-hello-long-names
@@ -0,0 +1,18 @@
+   Welcome to notmuch. You have 52 messages.
+
+Saved searches: [edit]
+
+	  52 inbox           52 unread    
+
+Search:                                                                     .
+
+All tags: [hide]
+
+	  52 a-very-long-tag       52 inbox                 52 unread 
+	   4 attachment             7 signed          
+
+	 Type a search query and hit RET to view matching threads.
+		Edit saved searches with the `edit' button.
+  Hit RET or click on a saved search or tag name to view matching threads.
+      `=' to refresh this screen. `s' to search messages. `q' to quit.
+			    Customize this page.
-- 
1.7.9.1


Thread: