X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=test%2FT465-emacs-unthreaded.sh;h=a3ff85fd01a3ddb24570011132d86397f92d9a27;hb=5ea5a5557d9ad4cef67e61a83bb81abd44dc7f76;hp=e7bc1439c50dc66632d5b3f905c55a5a59f9335b;hpb=3e2e724d53a1dce3ba00a20c71b2e6f735678136;p=notmuch diff --git a/test/T465-emacs-unthreaded.sh b/test/T465-emacs-unthreaded.sh index e7bc1439..a3ff85fd 100755 --- a/test/T465-emacs-unthreaded.sh +++ b/test/T465-emacs-unthreaded.sh @@ -57,4 +57,29 @@ test_emacs '(test-log-error (notmuch-unthreaded "*")))' test_expect_equal "$(cat MESSAGES)" "COMPLETE" +add_email_corpus duplicate + +ID3=87r2ecrr6x.fsf@zephyr.silentflame.com +test_begin_subtest "duplicate=3, subject" +test_emacs "(let ((notmuch-tree-show-out t)) + (notmuch-unthreaded \"id:${ID3}\") + (notmuch-test-wait) + (notmuch-tree-show-message nil) + (notmuch-show-choose-duplicate 3) + (test-visible-output \"OUTPUT\"))" +output=$(grep "Subject:" OUTPUT) +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