]> git.cworth.org Git - notmuch/blobdiff - test/T465-emacs-unthreaded.sh
emacs/show: provide notmuch-show-choose-duplicate
[notmuch] / test / T465-emacs-unthreaded.sh
index 1f386bf3784f51cd3fd95c7696af9102326b3ac1..9b96c7d75d43741f782ed47f6ca4c0851014f237 100755 (executable)
@@ -51,4 +51,25 @@ test_emacs '
 '
 test_expect_equal_file $EXPECTED/result-format-function OUTPUT
 
+test_begin_subtest "notmuch-unthreaded with nonexistent CWD"
+test_emacs '(test-log-error
+             (let ((default-directory "/nonexistent"))
+               (notmuch-unthreaded "*")))'
+test_expect_equal "$(cat MESSAGES)" "COMPLETE"
+
+add_email_corpus duplicate
+
+ID3=87r2ecrr6x.fsf@zephyr.silentflame.com
+test_begin_subtest "duplicate=3"
+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_done