aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2022-07-01 18:45:46 -0300
committerDavid Bremner <david@tethera.net>2022-07-30 08:44:14 -0300
commit5ea5a5557d9ad4cef67e61a83bb81abd44dc7f76 (patch)
tree8fb017be579b2f33f45c1689bacd4faee53e8649 /test
parentb3d466bf397a6f8d70bb50d6fa22c58e3d44badf (diff)
emacs/show: display count of duplicates in headerline
There is no real cost here, except screen real estate. Some people might prefer hiding the duplicate count, but we leave that for a future commit.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T450-emacs-show.sh8
-rwxr-xr-xtest/T460-emacs-tree.sh10
-rwxr-xr-xtest/T465-emacs-unthreaded.sh12
-rw-r--r--test/emacs-show.expected-output/notmuch-show-duplicate-420
4 files changed, 47 insertions, 3 deletions
diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh
index 9cc90d91..37940c96 100755
--- a/test/T450-emacs-show.sh
+++ b/test/T450-emacs-show.sh
@@ -341,7 +341,7 @@ test_expect_equal_file EXPECTED OUTPUT
add_email_corpus duplicate
ID3=87r2ecrr6x.fsf@zephyr.silentflame.com
-test_begin_subtest "duplicate=3"
+test_begin_subtest "duplicate=3, subject"
test_emacs "(notmuch-show \"id:${ID3}\")
(notmuch-show-choose-duplicate 3)
(test-visible-output \"OUTPUT\")"
@@ -367,4 +367,10 @@ cat <<EOF > EXPECTED
(error Duplicate 1000 out of range [1,5])
EOF
test_expect_equal_file EXPECTED MESSAGES
+test_begin_subtest "duplicate=4"
+test_emacs "(notmuch-show \"id:${ID3}\")
+ (notmuch-show-choose-duplicate 4)
+ (test-visible-output \"OUTPUT\")"
+test_expect_equal_file_nonempty $EXPECTED/notmuch-show-duplicate-4 OUTPUT
+
test_done
diff --git a/test/T460-emacs-tree.sh b/test/T460-emacs-tree.sh
index bae26e3b..3a1c449e 100755
--- a/test/T460-emacs-tree.sh
+++ b/test/T460-emacs-tree.sh
@@ -203,7 +203,7 @@ test_expect_equal "$(cat MESSAGES)" "COMPLETE"
add_email_corpus duplicate
ID3=87r2ecrr6x.fsf@zephyr.silentflame.com
-test_begin_subtest "duplicate=3"
+test_begin_subtest "duplicate=3, subject"
test_emacs "(notmuch-tree \"id:${ID3}\")
(notmuch-test-wait)
(notmuch-tree-show-message t)
@@ -214,4 +214,12 @@ file=$(notmuch search --output=files id:${ID3} | head -n 3 | tail -n 1)
subject=$(grep '^Subject:' $file)
test_expect_equal "$output" "$subject"
+test_begin_subtest "duplicate=4"
+test_emacs "(notmuch-show \"id:${ID3}\")
+ (notmuch-test-wait)
+ (notmuch-tree-show-message t)
+ (notmuch-show-choose-duplicate 4)
+ (test-visible-output \"OUTPUT\")"
+test_expect_equal_file_nonempty $NOTMUCH_SRCDIR/test/emacs-show.expected-output/notmuch-show-duplicate-4 OUTPUT
+
test_done
diff --git a/test/T465-emacs-unthreaded.sh b/test/T465-emacs-unthreaded.sh
index 9b96c7d7..a3ff85fd 100755
--- a/test/T465-emacs-unthreaded.sh
+++ b/test/T465-emacs-unthreaded.sh
@@ -60,7 +60,7 @@ test_expect_equal "$(cat MESSAGES)" "COMPLETE"
add_email_corpus duplicate
ID3=87r2ecrr6x.fsf@zephyr.silentflame.com
-test_begin_subtest "duplicate=3"
+test_begin_subtest "duplicate=3, subject"
test_emacs "(let ((notmuch-tree-show-out t))
(notmuch-unthreaded \"id:${ID3}\")
(notmuch-test-wait)
@@ -72,4 +72,14 @@ file=$(notmuch search --output=files id:${ID3} | head -n 3 | tail -n 1)
subject=$(grep '^Subject:' $file)
test_expect_equal "$output" "$subject"
+test_begin_subtest "duplicate=4"
+test_emacs "(let ((notmuch-tree-show-out t))
+ (notmuch-unthreaded \"id:${ID3}\")
+ (notmuch-test-wait)
+ (notmuch-tree-show-message nil)
+ (notmuch-show-choose-duplicate 4)
+ (test-visible-output \"OUTPUT\"))"
+test_expect_equal_file_nonempty $NOTMUCH_SRCDIR/test/emacs-show.expected-output/notmuch-show-duplicate-4 OUTPUT
+
+
test_done
diff --git a/test/emacs-show.expected-output/notmuch-show-duplicate-4 b/test/emacs-show.expected-output/notmuch-show-duplicate-4
new file mode 100644
index 00000000..6bf49d81
--- /dev/null
+++ b/test/emacs-show.expected-output/notmuch-show-duplicate-4
@@ -0,0 +1,20 @@
+Sean Whitton <spwhitton@spwhitton.name> (2018-12-20) (inbox signed) 4/5
+Subject: [Pkg-emacsen-addons] Bug#916811: Increase severity to 'serious'
+To: 916805@bugs.debian.org, 916807@bugs.debian.org, 916808@bugs.debian.org, 916809@bugs.debian.org, 916811@bugs.debian.org, 916867@bugs.debian.org, 916869@bugs.debian.org, 916872@bugs.debian.org, 916875@bugs.debian.org, 916876@bugs.debian.org
+Date: Thu, 20 Dec 2018 18:25:26 +0000
+
+[ multipart/mixed ]
+[ multipart/signed ]
+[ Unknown key ID 0x695B7AE4BF066240 or unsupported algorithm ]
+[ text/plain ]
+control: severity -1 serious
+
+Hello,
+
+Emacs 26.1 has reached Debian unstable (sooner than expected; sorry for
+all the e-mails).
+
+[ 2-line signature. Click/Enter to show. ]
+[ signature.asc: application/pgp-signature ]
+[ text/plain ]
+[ 4-line signature. Click/Enter to show. ]