From 1361dd37bc758c84ab32f629d04327231954c60b Mon Sep 17 00:00:00 2001 From: Dmitry Kurochkin Date: Fri, 9 Mar 2012 11:34:53 +0400 Subject: [PATCH] emacs: fix off-by-one error in notmuch-hello column alignment Expected results for few tests are fixed, the relevant test is unmarked broken. --- emacs/notmuch-hello.el | 2 +- test/emacs-hello | 1 - test/emacs.expected-output/notmuch-hello-new-section | 2 +- test/emacs.expected-output/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 e9caade5..28f39f19 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 9e5d0454..be66ba4c 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 c64d7128..6a339aae 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 8209feda..dc2568de 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