From 76b54f1898e97f6d07d0eaaf04a1772e60a7c48d Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Thu, 23 Jun 2011 15:10:31 -0700 Subject: test: Test emacs message composing with various values for notmuch-fcc-dirs We exercise each of the documented values (nil, a string, and a list). For the list, we test matching a specific entry, matching a catch-all regular expression, and no match at all (in which case there is no FCC set). --- test/emacs | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/test/emacs b/test/emacs index fa3426e..9b5d485 100755 --- a/test/emacs +++ b/test/emacs @@ -108,6 +108,78 @@ 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)" +test_begin_subtest "notmuch-fcc-dirs set to nil" +test_emacs "(setq notmuch-fcc-dirs nil) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: +Subject: +--text follows this line-- +EOF +test_expect_equal_file OUTPUT EXPECTED + +# Make another FCC maildir specific for the next test +mkdir -p mail/sent-string/cur +mkdir -p mail/sent-string/new +mkdir -p mail/sent-string/tmp + +test_begin_subtest "notmuch-fcc-dirs set to a string" +test_emacs "(setq notmuch-fcc-dirs nil) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +test_emacs "(setq notmuch-fcc-dirs \"sent-string\") (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: +Subject: +Fcc: ${MAIL_DIR}/sent-string +--text follows this line-- +EOF +test_expect_equal_file OUTPUT EXPECTED + +# Make more FCC maildirs specific for the next test +mkdir -p mail/sent-list-match/cur +mkdir -p mail/sent-list-match/new +mkdir -p mail/sent-list-match/tmp +mkdir -p mail/failure/cur +mkdir -p mail/failure/new +mkdir -p mail/failure/tmp + +test_begin_subtest "notmuch-fcc-dirs set to a list (with match)" +test_emacs "(setq notmuch-fcc-dirs '((\"notmuchmail.org\" . \"sent-list-match\") (\".*\" . \"failure\"))) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: +Subject: +Fcc: ${MAIL_DIR}/sent-list-match +--text follows this line-- +EOF +test_expect_equal_file OUTPUT EXPECTED + +# Make another FCC maildir specific for the next test +mkdir -p mail/sent-list-catch-all/cur +mkdir -p mail/sent-list-catch-all/new +mkdir -p mail/sent-list-catch-all/tmp + +test_begin_subtest "notmuch-fcc-dirs set to a list (catch-all)" +test_emacs "(setq notmuch-fcc-dirs '((\"example.com\" . \"failure\") (\".*\" . \"sent-list-catch-all\"))) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: +Subject: +Fcc: ${MAIL_DIR}/sent-list-catch-all +--text follows this line-- +EOF +test_expect_equal_file OUTPUT EXPECTED + +test_begin_subtest "notmuch-fcc-dirs set to a list (no match)" +test_emacs "(setq notmuch-fcc-dirs '((\"example.com\" . \"failure\") (\"nomatchhere.net\" . \"failure\"))) (notmuch-mua-mail) (princ (buffer-string))" > OUTPUT +cat <EXPECTED +From: Notmuch Test Suite +To: +Subject: +--text follows this line-- +EOF +test_expect_equal_file OUTPUT EXPECTED + test_begin_subtest "Reply within emacs" # We sed away everything before the ^From in the output to avoid getting # confused by messages such as "Parsing /home/cworth/.mailrc... done" -- cgit v1.2.3 From ce08571428dc784e279b28527f8073a1a05d7c37 Mon Sep 17 00:00:00 2001 From: Dmitry Kurochkin Date: Sat, 28 May 2011 14:51:49 -0700 Subject: Fix wrong-type-argument lisp error in `notmuch-fcc-header-setup' This error occurs when `notmuch-fcc-dirs' is set to a list. The error was in the `notmuch-fcc-dirs' format check which was changed in an incompatible way from 0.4 to 0.5. The fix was extracted from a bigger patch series by David Edmondson id:"1290682750-30283-2-git-send-email-dme@dme.org". Signed-off-by: Jameson Graef Rollins --- emacs/notmuch-maildir-fcc.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index aede753..b6c6e2a 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -88,7 +88,7 @@ will NOT be removed or replaced." notmuch-fcc-dirs) ((and (listp notmuch-fcc-dirs) - (= 1 (length (car notmuch-fcc-dirs)))) + (stringp (car notmuch-fcc-dirs))) ;; Old style - no longer works. (error "Invalid `notmuch-fcc-dirs' setting (old style)")) -- cgit v1.2.3 From 18bf91def97157538bca1b8aac5e624880c8f62e Mon Sep 17 00:00:00 2001 From: Pieter Praet Date: Mon, 20 Jun 2011 22:14:21 +0200 Subject: fix sum moar typos [text files] Various typo fixes in auxiliary text files included with the source, (README, TODO, etc.). Signed-off-by: Pieter Praet Edited-by: Carl Worth Restricted to just text files. --- NEWS | 10 +++++----- TODO | 4 ++-- compat/README | 2 +- packaging/debian | 4 ++-- test/README | 6 +++--- vim/README | 2 +- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index 5a1778e..dae7832 100644 --- a/NEWS +++ b/NEWS @@ -112,15 +112,15 @@ Allow for notmuch-fcc-dirs to have a value of nil. string. Instead it's now a list of cons cells where the car of each cell is a regular expression to be matched against the sender address, and the cdr is the name of a folder to use for an FCC. So - the old fallback behavior can be achieved by including a fineal cell + the old fallback behavior can be achieved by including a final cell of (".*" . "default-fcc-folder"). Vim interface improvements -------------------------- Felipe Contreras provided a number of updates for the vim interface. - These include optimiations, support for newer versions of vim, fixed - support for sending mail on modern systmms, new commands, and + These include optimizations, support for newer versions of vim, fixed + support for sending mail on modern systems, new commands, and various cleanups. New bindings @@ -606,7 +606,7 @@ Fix to compile against GMime 2.6 Fix configure script to accept (and ignore) various standard options. - For example, those that the gentoo build scripts expect configure to + For example, those that the Gentoo build scripts expect configure to accept are now all accepted. Test suite @@ -714,7 +714,7 @@ tags by region. Selective bulk tagging is now possible by selecting a region of threads and then using either the '+' or '-' keybindings. Bulk tagging is still available for all threads matching the current - search with th '*' binding. + search with the '*' binding. More meaningful buffer names for thread-view buffers. diff --git a/TODO b/TODO index 260ffe1..14dfa55 100644 --- a/TODO +++ b/TODO @@ -29,7 +29,7 @@ Make 'notmuch-show-pipe-message have a private history. Add support for a delete keybinding that adds a "deleted" tag to the current message/thread and make searches not return deleted messages -by default, (unless the user asks explicitly for deleted messags in +by default, (unless the user asks explicitly for deleted messages in the search query). Add keybindings for next/previous thread. @@ -119,7 +119,7 @@ Allow configuration for filename patterns that should be ignored when indexing. Replace the "notmuch part --part=id" command with "notmuch show ---part=id", (David Edmonson wants to rewrite some of "notmuch show" to +--part=id", (David Edmondson wants to rewrite some of "notmuch show" to provide more MIME-structure information in its output first). Replace the "notmuch search-tags" command with "notmuch search diff --git a/compat/README b/compat/README index cd32c56..38e2e14 100644 --- a/compat/README +++ b/compat/README @@ -1,4 +1,4 @@ -notmuch/comapt +notmuch/compat This directory consists of two things: diff --git a/packaging/debian b/packaging/debian index a586660..c8e8ddd 100644 --- a/packaging/debian +++ b/packaging/debian @@ -1,2 +1,2 @@ -The debian packaging exists in the top-level "debian" directory within -this source-code respository. +The Debian packaging exists in the top-level "debian" directory within +this source-code repository. diff --git a/test/README b/test/README index 07da480..be75e0e 100644 --- a/test/README +++ b/test/README @@ -151,7 +151,7 @@ library for your script to use. This works similar to test_expect_equal (see above) but is used to mark a test that demonstrates a known breakage, (that is, the - author of the test expectes "output" and "expected" to differ until + author of the test expects "output" and "expected" to differ until the breakage is fixed). See test_expect_failure for details. test_debug