]> git.notmuchmail.org Git - notmuch/commitdiff
test: Add test for fully-roundtripped FCC
authorCarl Worth <cworth@cworth.org>
Thu, 28 Oct 2010 00:08:09 +0000 (17:08 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 28 Oct 2010 00:08:09 +0000 (17:08 -0700)
We test that the message we sent via (fake) SMTP is included in the mail
index after a "notmuch new". This verifies that the FCC setting indeed
successfully saved the sent message within the notmuch mail store.

test/emacs

index 6fab3003da54e673cf3bb18845e77d7ec9540e1f..80b1024ff4c9415043726ccd44fc35d622130b7a 100755 (executable)
@@ -82,4 +82,9 @@ Content-Type: text/plain; charset=us-ascii
 
 This is a test that messages are sent via SMTP"
 
+test_begin_subtest "Verify that sent messages are saved/searchable (via FCC)"
+notmuch new > /dev/null
+output=$(notmuch search 'subject:"testing message sent via SMTP"' | notmuch_search_sanitize)
+test_expect_equal "$output" "thread:XXX   1974-03-29 [1/1] Notmuch Test Suite; Testing message sent via SMTP (inbox unread)"
+
 test_done