notmuch 0.17~rc4 release

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.15 (GNU/Linux)
 
 iQGcBAABCAAGBQJSv30MAAoJEPIClx2kp54s5KcL+wX3z4NjIOKcTUVEUI0A97JK
 RaGpm+TNSJjfiJSwzDPLm93S7Q+DGfPPTuAWUL69fJlDYvGRRlZfsVSLTq/YLPOz
 cfz9laTp+gqEF9aDGCa/1vZdfmP6ojXOvm24LiRo/LGS9t6OQUts4Ia1zzsNzFJT
 hBblll2sk21c//biD8wLfBj6vKwXNmQAiNiPl1sYbhGjTSPe1pnvPoe4DuhJHk5A
 +V6bq8xRGMGRDayOCsYDoKlYT89IlcHAFQLQiaxNJQ+diopNsK2w4rWJhQr9xkvV
 Ps9wySt48Smlw4wkDUswiBy8K9xrnVZ/pKPzCl4M/ObLBgYXD2Z6m8el+3KKXVk3
 i9PUyrjtaUURvtZJphTdCPX8qr4DMWPhf0hmOH8AO7BpVG9DAXkB3GBEI9Gy/9yR
 RaeuJEYIO8EbQ3cX8bQexU+ZzQTohZyBVSj5BuRgHzFrySGhRSxzb4W1ESqieEiS
 b6/71t/8WH1K3WPol2HeId38BGC6X8J6mnVINfbGeA==
 =z/ep
 -----END PGP SIGNATURE-----

Merge tag '0.17_rc4'

notmuch 0.17~rc4 release
This commit is contained in:
David Bremner 2013-12-28 21:45:19 -04:00
commit 47b9314eee
31 changed files with 113 additions and 67 deletions

2
NEWS
View file

@ -1,4 +1,4 @@
Notmuch 0.17~rc3 (2013-12-07) Notmuch 0.17~rc4 (2013-12-28)
============================= =============================
Incompatible change in SHA1 computation Incompatible change in SHA1 computation

View file

@ -1,2 +1,2 @@
# this file should be kept in sync with ../../../version # this file should be kept in sync with ../../../version
__VERSION__ = '0.17~rc3' __VERSION__ = '0.17~rc4'

6
debian/changelog vendored
View file

@ -1,3 +1,9 @@
notmuch (0.17~rc4-1) experimental; urgency=low
* New upstream release candidate
-- David Bremner <bremner@debian.org> Sat, 28 Dec 2013 18:30:06 -0400
notmuch (0.17~rc3-1) experimental; urgency=low notmuch (0.17~rc3-1) experimental; urgency=low
* New upstream release candidate * New upstream release candidate

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-COMPACT 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-COMPACT 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-compact \- compact the notmuch database notmuch-compact \- compact the notmuch database
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-CONFIG 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-CONFIG 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-config \- access notmuch configuration file notmuch-config \- access notmuch configuration file
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-COUNT 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-COUNT 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-count \- count messages matching the given search terms notmuch-count \- count messages matching the given search terms
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-DUMP 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-DUMP 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-dump \- creates a plain-text dump of the tags of each message notmuch-dump \- creates a plain-text dump of the tags of each message

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-INSERT 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-INSERT 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-insert \- add a message to the maildir and notmuch database notmuch-insert \- add a message to the maildir and notmuch database
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-NEW 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-NEW 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-new \- incorporate new mail into the notmuch database notmuch-new \- incorporate new mail into the notmuch database
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-REPLY 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-REPLY 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-reply \- constructs a reply template for a set of messages notmuch-reply \- constructs a reply template for a set of messages

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-RESTORE 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-RESTORE 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-restore \- restores the tags from the given file (see notmuch dump) notmuch-restore \- restores the tags from the given file (see notmuch dump)

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-SEARCH 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-SEARCH 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-search \- search for messages matching the given search terms notmuch-search \- search for messages matching the given search terms
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-SHOW 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-SHOW 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-show \- show messages matching the given search terms notmuch-show \- show messages matching the given search terms
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-TAG 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-TAG 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-tag \- add/remove tags for all messages matching the search terms notmuch-tag \- add/remove tags for all messages matching the search terms

View file

@ -16,7 +16,7 @@
.\" along with this program. If not, see http://www.gnu.org/licenses/ . .\" along with this program. If not, see http://www.gnu.org/licenses/ .
.\" .\"
.\" Author: Carl Worth <cworth@cworth.org> .\" Author: Carl Worth <cworth@cworth.org>
.TH NOTMUCH 1 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH 1 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch \- thread-based email index, search, and tagging notmuch \- thread-based email index, search, and tagging
.SH SYNOPSIS .SH SYNOPSIS

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-HOOKS 5 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-HOOKS 5 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-hooks \- hooks for notmuch notmuch-hooks \- hooks for notmuch

View file

@ -1,4 +1,4 @@
.TH NOTMUCH-SEARCH-TERMS 7 2013-12-07 "Notmuch 0.17~rc3" .TH NOTMUCH-SEARCH-TERMS 7 2013-12-28 "Notmuch 0.17~rc4"
.SH NAME .SH NAME
notmuch-search-terms \- syntax for notmuch queries notmuch-search-terms \- syntax for notmuch queries

View file

@ -28,12 +28,8 @@ add_gnupg_home
# get key fingerprint # get key fingerprint
FINGERPRINT=$(gpg --no-tty --list-secret-keys --with-colons --fingerprint | grep '^fpr:' | cut -d: -f10) FINGERPRINT=$(gpg --no-tty --list-secret-keys --with-colons --fingerprint | grep '^fpr:' | cut -d: -f10)
# for some reason this is needed for emacs_deliver_message to work,
# although I can't figure out why
add_email_corpus
test_expect_success 'emacs delivery of signed message' \ test_expect_success 'emacs delivery of signed message' \
'emacs_deliver_message \ 'emacs_fcc_message \
"test signed message 001" \ "test signed message 001" \
"This is a test signed message." \ "This is a test signed message." \
"(mml-secure-message-sign)"' "(mml-secure-message-sign)"'
@ -143,7 +139,7 @@ cat <<EOF >TESTATTACHMENT
This is a test file. This is a test file.
EOF EOF
test_expect_success 'emacs delivery of encrypted message with attachment' \ test_expect_success 'emacs delivery of encrypted message with attachment' \
'emacs_deliver_message \ 'emacs_fcc_message \
"test encrypted message 001" \ "test encrypted message 001" \
"This is a test encrypted message.\n" \ "This is a test encrypted message.\n" \
"(mml-attach-file \"TESTATTACHMENT\") (mml-secure-message-encrypt)"' "(mml-attach-file \"TESTATTACHMENT\") (mml-secure-message-encrypt)"'
@ -270,7 +266,7 @@ test_expect_equal_json \
mv "${GNUPGHOME}"{.bak,} mv "${GNUPGHOME}"{.bak,}
test_expect_success 'emacs delivery of encrypted + signed message' \ test_expect_success 'emacs delivery of encrypted + signed message' \
'emacs_deliver_message \ 'emacs_fcc_message \
"test encrypted message 002" \ "test encrypted message 002" \
"This is another test encrypted message.\n" \ "This is another test encrypted message.\n" \
"(mml-secure-message-sign-encrypt)"' "(mml-secure-message-sign-encrypt)"'

View file

@ -86,15 +86,16 @@ add_message "[subject]=\"message-with-invalid-from\"" \
"[from]=\"\\\"Invalid \\\" From\\\" <test_suite@notmuchmail.org>\"" "[from]=\"\\\"Invalid \\\" From\\\" <test_suite@notmuchmail.org>\""
thread=$(notmuch search --output=threads subject:message-with-invalid-from) thread=$(notmuch search --output=threads subject:message-with-invalid-from)
test_emacs "(notmuch-show \"$thread\") test_emacs "(notmuch-show \"$thread\")
(test-output)" (test-output \"OUTPUT.raw\")"
cat <<EOF >EXPECTED cat <<EOF >EXPECTED
"Invalid " (2001-01-05) (inbox) "Invalid " (2001-01-05) (inbox)
Subject: message-with-invalid-from Subject: message-with-invalid-from
To: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org>
Date: Fri, 05 Jan 2001 15:43:57 +0000 Date: GENERATED_DATE
This is just a test message (#1) This is just a test message (#1)
EOF EOF
notmuch_date_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file OUTPUT EXPECTED test_expect_equal_file OUTPUT EXPECTED
test_begin_subtest "Navigation of notmuch-search to thread view" test_begin_subtest "Navigation of notmuch-search to thread view"
@ -605,11 +606,11 @@ Q: Why is top-posting such a bad thing?
A: Top-posting. A: Top-posting.
Q: What is the most annoying thing in e-mail?"' Q: What is the most annoying thing in e-mail?"'
test_emacs "(notmuch-show \"top-posting\") test_emacs "(notmuch-show \"top-posting\")
(test-visible-output)" (test-visible-output \"OUTPUT.raw\")"
echo "Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox) echo "Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
Subject: The problem with top-posting Subject: The problem with top-posting
To: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org>
Date: Fri, 05 Jan 2001 15:43:57 +0000 Date: GENERATED_DATE
A: Because it messes up the order in which people normally read text. A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing? Q: Why is top-posting such a bad thing?
@ -618,13 +619,14 @@ Q: What is the most annoying thing in e-mail?
Top Poster <top@poster.com> (2001-01-05) (inbox unread) Top Poster <top@poster.com> (2001-01-05) (inbox unread)
Subject: Re: The problem with top-posting Subject: Re: The problem with top-posting
To: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org>
Date: Fri, 05 Jan 2001 15:43:57 +0000 Date: GENERATED_DATE
Thanks for the advice! I will be sure to put it to good use. Thanks for the advice! I will be sure to put it to good use.
-Top Poster -Top Poster
[ 9-line hidden original message. Click/Enter to show. ]" > EXPECTED [ 9-line hidden original message. Click/Enter to show. ]" > EXPECTED
notmuch_date_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file OUTPUT EXPECTED test_expect_equal_file OUTPUT EXPECTED
test_begin_subtest "Hiding message in notmuch-show view" test_begin_subtest "Hiding message in notmuch-show view"
@ -769,7 +771,7 @@ test_expect_equal_file OUTPUT EXPECTED
test_begin_subtest "Do not call notmuch for non-inlinable application/mpeg parts" test_begin_subtest "Do not call notmuch for non-inlinable application/mpeg parts"
id='message-with-application/mpeg-attachment@notmuchmail.org' id='message-with-application/mpeg-attachment@notmuchmail.org'
emacs_deliver_message \ emacs_fcc_message \
'Message with application/mpeg attachment' \ 'Message with application/mpeg attachment' \
'' \ '' \
"(message-goto-eoh) "(message-goto-eoh)
@ -784,7 +786,7 @@ test_expect_equal $(notmuch_counter_value) 1
test_begin_subtest "Do not call notmuch for non-inlinable audio/mpeg parts" test_begin_subtest "Do not call notmuch for non-inlinable audio/mpeg parts"
id='message-with-audio/mpeg-attachment@notmuchmail.org' id='message-with-audio/mpeg-attachment@notmuchmail.org'
emacs_deliver_message \ emacs_fcc_message \
'Message with audio/mpeg attachment' \ 'Message with audio/mpeg attachment' \
'' \ '' \
"(message-goto-eoh) "(message-goto-eoh)

View file

@ -19,13 +19,14 @@ cat <<EOF >EXPECTED
Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox) Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
Subject: Hiding Original Message region at beginning of a message Subject: Hiding Original Message region at beginning of a message
To: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org>
Date: Fri, 05 Jan 2001 15:43:57 +0000 Date: GENERATED_DATE
[ 2-line hidden original message. Click/Enter to show. ] [ 2-line hidden original message. Click/Enter to show. ]
EOF EOF
test_emacs "(notmuch-show \"id:$message_id\") test_emacs "(notmuch-show \"id:$message_id\")
(test-visible-output)" (test-visible-output \"OUTPUT.raw\")"
notmuch_date_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file OUTPUT EXPECTED test_expect_equal_file OUTPUT EXPECTED
test_begin_subtest "Bare subject #1" test_begin_subtest "Bare subject #1"
@ -130,12 +131,12 @@ mid:abc%20def
mid:abc. mid:abc, mid:abc;"' mid:abc. mid:abc, mid:abc;"'
test_emacs '(notmuch-show "id:'$gen_msg_id'") test_emacs '(notmuch-show "id:'$gen_msg_id'")
(notmuch-test-mark-links) (notmuch-test-mark-links)
(test-visible-output)' (test-visible-output "OUTPUT.raw")'
cat <<EOF >EXPECTED cat <<EOF >EXPECTED
Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox) Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox)
Subject: id buttonization Subject: id buttonization
To: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org>
Date: Fri, 05 Jan 2001 15:43:57 +0000 Date: GENERATED_DATE
<<id:abc>> <<id:abc>>
<<id:abc.def>>. <<id:abc,def>>, <<id:abc;def>>; <<id:abc:def>>: <<id:abc.def>>. <<id:abc,def>>, <<id:abc;def>>; <<id:abc:def>>:
@ -159,6 +160,7 @@ cid:xxx
<<mid:abc%20def>> <<mid:abc%20def>>
<<mid:abc>>. <<mid:abc>>, <<mid:abc>>; <<mid:abc>>. <<mid:abc>>, <<mid:abc>>;
EOF EOF
notmuch_date_sanitize < OUTPUT.raw > OUTPUT
test_expect_equal_file OUTPUT EXPECTED test_expect_equal_file OUTPUT EXPECTED

View file

@ -5,14 +5,14 @@ test_description="encoding issues"
test_begin_subtest "Message with text of unknown charset" test_begin_subtest "Message with text of unknown charset"
add_message '[content-type]="text/plain; charset=unknown-8bit"' \ add_message '[content-type]="text/plain; charset=unknown-8bit"' \
"[body]=irrelevant" "[body]=irrelevant"
output=$(notmuch show id:${gen_msg_id} 2>&1 | notmuch_show_sanitize) output=$(notmuch show id:${gen_msg_id} 2>&1 | notmuch_show_sanitize_all)
test_expect_equal "$output" " message{ id:msg-001@notmuch-test-suite depth:0 match:1 excluded:0 filename:/XXX/mail/msg-001 test_expect_equal "$output" " message{ id:XXXXX depth:0 match:1 excluded:0 filename:XXXXX
header{ header{
Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox unread) Notmuch Test Suite <test_suite@notmuchmail.org> (2001-01-05) (inbox unread)
Subject: Message with text of unknown charset Subject: Message with text of unknown charset
From: Notmuch Test Suite <test_suite@notmuchmail.org> From: Notmuch Test Suite <test_suite@notmuchmail.org>
To: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org>
Date: Fri, 05 Jan 2001 15:43:57 +0000 Date: GENERATED_DATE
header} header}
body{ body{
part{ ID: 1, Content-type: text/plain part{ ID: 1, Content-type: text/plain
@ -26,7 +26,7 @@ add_message '[content-type]="text/plain; charset=iso-8859-2"' \
'[content-transfer-encoding]=8bit' \ '[content-transfer-encoding]=8bit' \
'[subject]="ISO-8859-2 encoded message"' \ '[subject]="ISO-8859-2 encoded message"' \
"[body]=$'Czech word tu\350\362\341\350\350\355 means pinguin\'s.'" # ISO-8859-2 characters are generated by shell's escape sequences "[body]=$'Czech word tu\350\362\341\350\350\355 means pinguin\'s.'" # ISO-8859-2 characters are generated by shell's escape sequences
output=$(notmuch search tučňáččí 2>&1 | notmuch_show_sanitize) output=$(notmuch search tučňáččí 2>&1 | notmuch_show_sanitize_all)
test_expect_equal "$output" "thread:0000000000000002 2001-01-05 [1/1] Notmuch Test Suite; ISO-8859-2 encoded message (inbox unread)" test_expect_equal "$output" "thread:0000000000000002 2001-01-05 [1/1] Notmuch Test Suite; ISO-8859-2 encoded message (inbox unread)"
test_begin_subtest "RFC 2047 encoded word with spaces" test_begin_subtest "RFC 2047 encoded word with spaces"

View file

@ -67,7 +67,7 @@ thread:XXX 2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inb
test_begin_subtest "Search, don't exclude \"deleted\" messages when --exclude=flag specified" test_begin_subtest "Search, don't exclude \"deleted\" messages when --exclude=flag specified"
output=$(notmuch search --exclude=flag subject:deleted | notmuch_search_sanitize) output=$(notmuch search --exclude=flag subject:deleted | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread) test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; Not deleted (inbox unread)
thread:XXX 2001-01-05 [1/2] Notmuch Test Suite; Not deleted reply (deleted inbox unread)" thread:XXX 2001-01-05 [1/2] Notmuch Test Suite; Deleted (deleted inbox unread)"
test_begin_subtest "Search, don't exclude \"deleted\" messages from search if not configured" test_begin_subtest "Search, don't exclude \"deleted\" messages from search if not configured"
notmuch config set search.exclude_tags notmuch config set search.exclude_tags
@ -152,7 +152,7 @@ ${matching_message_ids[5]}"
test_begin_subtest "Search, exclude=flag (thread summary)" test_begin_subtest "Search, exclude=flag (thread summary)"
output=$(notmuch search --exclude=flag tag:test | notmuch_search_sanitize) output=$(notmuch search --exclude=flag tag:test | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2001-01-05 [0/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread) test_expect_equal "$output" "thread:XXX 2001-01-05 [0/6] Notmuch Test Suite; All messages excluded: single match: reply 2 (deleted inbox test unread)
thread:XXX 2001-01-05 [0/6] Notmuch Test Suite; All messages excluded: double match: reply 4 (deleted inbox test unread) thread:XXX 2001-01-05 [0/6] Notmuch Test Suite; All messages excluded: double match: reply 2 (deleted inbox test unread)
thread:XXX 2001-01-05 [0/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread) thread:XXX 2001-01-05 [0/6] Notmuch Test Suite; Some messages excluded: single excluded match: reply 3 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (deleted inbox test unread) thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; Some messages excluded: single non-excluded match: reply 4 (deleted inbox test unread)
thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)" thread:XXX 2001-01-05 [1/6] Notmuch Test Suite; No messages excluded: single match: reply 3 (inbox test unread)"

View file

@ -38,7 +38,7 @@ test_expect_equal_json "$output" "[[[{\"id\": \"${gen_msg_id}\", \"match\": true
test_begin_subtest "Show message: json, inline attachment filename" test_begin_subtest "Show message: json, inline attachment filename"
subject='json-show-inline-attachment-filename' subject='json-show-inline-attachment-filename'
id="json-show-inline-attachment-filename@notmuchmail.org" id="json-show-inline-attachment-filename@notmuchmail.org"
emacs_deliver_message \ emacs_fcc_message \
"$subject" \ "$subject" \
'This is a test message with inline attachment with a filename' \ 'This is a test message with inline attachment with a filename' \
"(mml-attach-file \"$TEST_DIRECTORY/README\" nil nil \"inline\") "(mml-attach-file \"$TEST_DIRECTORY/README\" nil nil \"inline\")

View file

@ -4,11 +4,6 @@ test_description="maildir synchronization"
. ./test-lib.sh . ./test-lib.sh
# Avoid including the local value of MAIL_DIR in the result.
filter_show_json() {
sed -e "s|${MAIL_DIR}/|MAIL_DIR/|"
}
# Create the expected maildir structure # Create the expected maildir structure
mkdir $MAIL_DIR/cur mkdir $MAIL_DIR/cur
mkdir $MAIL_DIR/new mkdir $MAIL_DIR/new
@ -40,18 +35,18 @@ output=$(cd ${MAIL_DIR}/cur; ls -1 adding-replied*)
test_expect_equal "$output" "adding-replied-tag:2,RS" test_expect_equal "$output" "adding-replied-tag:2,RS"
test_begin_subtest "notmuch show works with renamed file (without notmuch new)" test_begin_subtest "notmuch show works with renamed file (without notmuch new)"
output=$(notmuch show --format=json id:${gen_msg_id} | filter_show_json) output=$(notmuch show --format=json id:${gen_msg_id} | notmuch_json_show_sanitize)
test_expect_equal_json "$output" '[[[{"id": "adding-replied-tag@notmuch-test-suite", test_expect_equal_json "$output" '[[[{"id": "XXXXX",
"match": true, "match": true,
"excluded": false, "excluded": false,
"filename": "MAIL_DIR/cur/adding-replied-tag:2,RS", "filename": "YYYYY",
"timestamp": 978709437, "timestamp": 42,
"date_relative": "2001-01-05", "date_relative": "2001-01-05",
"tags": ["inbox","replied"], "tags": ["inbox","replied"],
"headers": {"Subject": "Adding replied tag", "headers": {"Subject": "Adding replied tag",
"From": "Notmuch Test Suite <test_suite@notmuchmail.org>", "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
"To": "Notmuch Test Suite <test_suite@notmuchmail.org>", "To": "Notmuch Test Suite <test_suite@notmuchmail.org>",
"Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "Date": "GENERATED_DATE"},
"body": [{"id": 1, "body": [{"id": 1,
"content-type": "text/plain", "content-type": "text/plain",
"content": "This is just a test message (#3)\n"}]}, "content": "This is just a test message (#3)\n"}]},

View file

@ -95,7 +95,7 @@ Body
test_begin_subtest "Show: json" test_begin_subtest "Show: json"
output=$(notmuch show --format=json '*' | notmuch_json_show_sanitize) output=$(notmuch show --format=json '*' | notmuch_json_show_sanitize)
test_expect_equal_json "$output" ' expected=$(notmuch_json_show_sanitize <<EOF
[ [
[ [
[ [
@ -156,7 +156,9 @@ test_expect_equal_json "$output" '
[] []
] ]
] ]
]' ]
EOF
)
test_expect_equal_json "$output" "$expected"
test_done test_done

View file

@ -594,7 +594,7 @@ test_expect_equal_file OUTPUT EXPECTED
test_begin_subtest "'notmuch reply' to a multipart message with json format" test_begin_subtest "'notmuch reply' to a multipart message with json format"
notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_json_show_sanitize >OUTPUT notmuch reply --format=json 'id:87liy5ap00.fsf@yoom.home.cworth.org' | notmuch_json_show_sanitize >OUTPUT
cat <<EOF >EXPECTED notmuch_json_show_sanitize <<EOF >EXPECTED
{"reply-headers": {"Subject": "Re: Multipart message", {"reply-headers": {"Subject": "Re: Multipart message",
"From": "Notmuch Test Suite <test_suite@notmuchmail.org>", "From": "Notmuch Test Suite <test_suite@notmuchmail.org>",
"To": "Carl Worth <cworth@cworth.org>, cworth@cworth.org", "To": "Carl Worth <cworth@cworth.org>, cworth@cworth.org",

View file

@ -218,9 +218,10 @@ test_expect_equal "$output" "Added 1 new message to the database."
test_begin_subtest "Ignore files and directories specified in new.ignore (multiple occurrences)" test_begin_subtest "Ignore files and directories specified in new.ignore (multiple occurrences)"
notmuch config set new.ignore .git ignored_file .ignored_hidden_file notmuch config set new.ignore .git ignored_file .ignored_hidden_file
touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan.
mkdir -p "${MAIL_DIR}"/one/two/three/.git
notmuch new > /dev/null # ensure that files/folders will be printed in ASCII order. notmuch new > /dev/null # ensure that files/folders will be printed in ASCII order.
touch "${MAIL_DIR}"/.git # change .git's mtime for notmuch new to rescan.
touch "${MAIL_DIR}" # likewise for MAIL_DIR
mkdir -p "${MAIL_DIR}"/one/two/three/.git
touch "${MAIL_DIR}"/{one,one/two,one/two/three}/ignored_file touch "${MAIL_DIR}"/{one,one/two,one/two/three}/ignored_file
output=$(NOTMUCH_NEW --debug 2>&1 | sort) output=$(NOTMUCH_NEW --debug 2>&1 | sort)
test_expect_equal "$output" \ test_expect_equal "$output" \

View file

@ -11,22 +11,22 @@ output=$(notmuch show --format=raw "*" 2>&1)
test_expect_equal "$output" "Error: search term did not match precisely one message." test_expect_equal "$output" "Error: search term did not match precisely one message."
test_begin_subtest "Show a raw message" test_begin_subtest "Show a raw message"
output=$(notmuch show --format=raw id:msg-001@notmuch-test-suite) output=$(notmuch show --format=raw id:msg-001@notmuch-test-suite | notmuch_date_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org> test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
To: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org>
Message-Id: <msg-001@notmuch-test-suite> Message-Id: <msg-001@notmuch-test-suite>
Subject: Test message #1 Subject: Test message #1
Date: Fri, 05 Jan 2001 15:43:57 +0000 Date: GENERATED_DATE
This is just a test message (#1)" This is just a test message (#1)"
test_begin_subtest "Show another raw message" test_begin_subtest "Show another raw message"
output=$(notmuch show --format=raw id:msg-002@notmuch-test-suite) output=$(notmuch show --format=raw id:msg-002@notmuch-test-suite | notmuch_date_sanitize)
test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org> test_expect_equal "$output" "From: Notmuch Test Suite <test_suite@notmuchmail.org>
To: Notmuch Test Suite <test_suite@notmuchmail.org> To: Notmuch Test Suite <test_suite@notmuchmail.org>
Message-Id: <msg-002@notmuch-test-suite> Message-Id: <msg-002@notmuch-test-suite>
Subject: Test message #2 Subject: Test message #2
Date: Fri, 05 Jan 2001 15:43:57 +0000 Date: GENERATED_DATE
This is just a test message (#2)" This is just a test message (#2)"

View file

@ -29,7 +29,7 @@ test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :f
test_begin_subtest "Show message: sexp, inline attachment filename" test_begin_subtest "Show message: sexp, inline attachment filename"
subject='sexp-show-inline-attachment-filename' subject='sexp-show-inline-attachment-filename'
id="sexp-show-inline-attachment-filename@notmuchmail.org" id="sexp-show-inline-attachment-filename@notmuchmail.org"
emacs_deliver_message \ emacs_fcc_message \
"$subject" \ "$subject" \
'This is a test message with inline attachment with a filename' \ 'This is a test message with inline attachment with a filename' \
"(mml-attach-file \"$TEST_DIRECTORY/README\" nil nil \"inline\") "(mml-attach-file \"$TEST_DIRECTORY/README\" nil nil \"inline\")

View file

@ -370,7 +370,11 @@ generate_message ()
fi fi
if [ -z "${template[date]}" ]; then if [ -z "${template[date]}" ]; then
template[date]="Fri, 05 Jan 2001 15:43:57 +0000" # we use decreasing timestamps here for historical reasons;
# the existing test suite when we converted to unique timestamps just
# happened to have signicantly fewer failures with that choice.
template[date]=$(TZ=UTC printf "%(%a, %d %b %Y %T %z)T\n" \
$((978709437 - gen_msg_cnt)))
fi fi
additional_headers="" additional_headers=""
@ -462,7 +466,6 @@ emacs_deliver_message ()
(mail-host-address \"example.com\") (mail-host-address \"example.com\")
(smtpmail-smtp-server \"localhost\") (smtpmail-smtp-server \"localhost\")
(smtpmail-smtp-service \"25025\")) (smtpmail-smtp-service \"25025\"))
(notmuch-hello)
(notmuch-mua-mail) (notmuch-mua-mail)
(message-goto-to) (message-goto-to)
(insert \"test_suite@notmuchmail.org\nDate: 01 Jan 2000 12:00:00 -0000\") (insert \"test_suite@notmuchmail.org\nDate: 01 Jan 2000 12:00:00 -0000\")
@ -480,6 +483,36 @@ emacs_deliver_message ()
notmuch new >/dev/null notmuch new >/dev/null
} }
# Pretend to deliver a message with emacs. Really save it to a file
# and add it to the database
#
# Uses emacs to generate and deliver a message to the mail store.
# Accepts arbitrary extra emacs/elisp functions to modify the message
# before sending, which is useful to doing things like attaching files
# to the message and encrypting/signing.
emacs_fcc_message ()
{
local subject="$1"
local body="$2"
shift 2
# before we can send a message, we have to prepare the FCC maildir
mkdir -p "$MAIL_DIR"/sent/{cur,new,tmp}
test_emacs \
"(let ((message-send-mail-function (lambda () t))
(mail-host-address \"example.com\"))
(notmuch-mua-mail)
(message-goto-to)
(insert \"test_suite@notmuchmail.org\nDate: 01 Jan 2000 12:00:00 -0000\")
(message-goto-subject)
(insert \"${subject}\")
(message-goto-body)
(insert \"${body}\")
$@
(message-send-and-exit))" || return 1
notmuch new >/dev/null
}
# Generate a corpus of email and add it to the database. # Generate a corpus of email and add it to the database.
# #
# This corpus is fixed, (it happens to be 50 messages from early in # This corpus is fixed, (it happens to be 50 messages from early in
@ -632,14 +665,17 @@ notmuch_show_sanitize_all ()
{ {
sed \ sed \
-e 's| filename:.*| filename:XXXXX|' \ -e 's| filename:.*| filename:XXXXX|' \
-e 's| id:[^ ]* | id:XXXXX |' -e 's| id:[^ ]* | id:XXXXX |' | \
notmuch_date_sanitize
} }
notmuch_json_show_sanitize () notmuch_json_show_sanitize ()
{ {
sed \ sed \
-e 's|"id": "[^"]*",|"id": "XXXXX",|g' \ -e 's|"id": "[^"]*",|"id": "XXXXX",|g' \
-e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g' -e 's|"Date": "Fri, 05 Jan 2001 [^"]*0000"|"Date": "GENERATED_DATE"|g' \
-e 's|"filename": "/[^"]*",|"filename": "YYYYY",|g' \
-e 's|"timestamp": 97.......|"timestamp": 42|g'
} }
notmuch_emacs_error_sanitize () notmuch_emacs_error_sanitize ()
@ -653,6 +689,12 @@ notmuch_emacs_error_sanitize ()
-e 's/^\[.*\]$/[XXX]/' \ -e 's/^\[.*\]$/[XXX]/' \
-e "s|^\(command: \)\{0,1\}/.*/$command|\1YYY/$command|" -e "s|^\(command: \)\{0,1\}/.*/$command|\1YYY/$command|"
} }
notmuch_date_sanitize ()
{
sed \
-e 's/^Date: Fri, 05 Jan 2001 .*0000/Date: GENERATED_DATE/'
}
# End of notmuch helper functions # End of notmuch helper functions
# Use test_set_prereq to tell that a particular prerequisite is available. # Use test_set_prereq to tell that a particular prerequisite is available.

View file

@ -1 +1 @@
0.17~rc3 0.17~rc4