[PATCH 2/2] emacs: fix off-by-one error in notmuch-hello column alignment
Dmitry Kurochkin
dmitry.kurochkin at gmail.com
Thu Mar 8 23:34:53 PST 2012
Expected results for few tests are fixed, the relevant test is
unmarked broken.
---
emacs/notmuch-hello.el | 2 +-
test/emacs-hello | 1 -
.../notmuch-hello-new-section | 2 +-
.../notmuch-hello-section-with-empty | 2 +-
4 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index e9caade..28f39f1 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -461,7 +461,7 @@ Such a list can be computed with `notmuch-hello-query-counts'."
;; just insert `(- widest (length name))' spaces - the
;; column separator is included in the button if
;; `(equal widest (length name)'.
- (widget-insert (make-string (max 1
+ (widget-insert (make-string (max 0
(- widest (length name)))
? )))))
(setq count (1+ count))
diff --git a/test/emacs-hello b/test/emacs-hello
index 9e5d045..be66ba4 100755
--- a/test/emacs-hello
+++ b/test/emacs-hello
@@ -45,7 +45,6 @@ test_emacs "(let ((notmuch-hello-sections
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)
diff --git a/test/emacs.expected-output/notmuch-hello-new-section b/test/emacs.expected-output/notmuch-hello-new-section
index c64d712..6a339aa 100644
--- a/test/emacs.expected-output/notmuch-hello-new-section
+++ b/test/emacs.expected-output/notmuch-hello-new-section
@@ -1,4 +1,4 @@
Test: [hide]
- 52 inbox
+ 52 inbox
diff --git a/test/emacs.expected-output/notmuch-hello-section-with-empty b/test/emacs.expected-output/notmuch-hello-section-with-empty
index 8209fed..dc2568d 100644
--- a/test/emacs.expected-output/notmuch-hello-section-with-empty
+++ b/test/emacs.expected-output/notmuch-hello-section-with-empty
@@ -1,4 +1,4 @@
Test-with-empty: [hide]
- 52 inbox
+ 52 inbox
--
1.7.9.1
More information about the notmuch
mailing list