aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/search-insufficient-from-quoting
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2011-01-29 06:21:25 +1000
committerGravatar Carl Worth <cworth@cworth.org>2011-03-09 15:10:03 -0800
commitf14d4c55ce95edacd4c04318f1d729fef0207aec (patch)
tree5c6fda025098b33db7980882b440e25ac670098c /test/search-insufficient-from-quoting
parent99ad348deb8282185ae56a51dc4af02f3c241f97 (diff)
test: Rename and clarify the search-lwn test
Now that we understand the bug here, we rename this test to search-insufficient-from-quoting to clarify the bug being exercised, (which occurs when the From: line contains an unquoted '.' character). We also mark these tests as expected failures until the bug gets fixed.
Diffstat (limited to 'test/search-insufficient-from-quoting')
-rwxr-xr-xtest/search-insufficient-from-quoting44
1 files changed, 44 insertions, 0 deletions
diff --git a/test/search-insufficient-from-quoting b/test/search-insufficient-from-quoting
new file mode 100755
index 00000000..6c858a88
--- /dev/null
+++ b/test/search-insufficient-from-quoting
@@ -0,0 +1,44 @@
+#!/bin/bash
+test_description='messages with unquoted . in name'
+. ./test-lib.sh
+
+add_message \
+ '[from]="Some.Name for Someone <bugs@quoting.com>"' \
+ '[subject]="This message needs more quoting on the From line"'
+
+add_message \
+ '[from]="\"Some.Name for Someone\" <bugs@quoting.com>"' \
+ '[subject]="This message has necessary quoting in place"'
+
+add_message \
+ '[from]="No.match Here <filler@mail.com>"' \
+ '[subject]="This message needs more quoting on the From line"'
+
+add_message \
+ '[from]="\"No.match Here\" <filler@mail.com>"' \
+ '[subject]="This message has necessary quoting in place"'
+
+
+test_begin_subtest "Search by first name"
+output=$(notmuch search from:Some.Name | notmuch_search_sanitize)
+test_expect_equal_failure "$output" "thread:XXX 2001-01-05 [1/1] Some.Name for Someone; This message needs more quoting on the From line (inbox unread)
+thread:XXX 2001-01-05 [1/1] Some.Name for Someone; This message has necessary quoting in place (inbox unread)"
+
+test_begin_subtest "Search by last name:"
+output=$(notmuch search from:Someone | notmuch_search_sanitize)
+test_expect_equal_failure "$output" "thread:XXX 2001-01-05 [1/1] Some.Name for Someone; This message needs more quoting on the From line (inbox unread)
+thread:XXX 2001-01-05 [1/1] Some.Name for Someone; This message has necessary quoting in place (inbox unread)"
+
+test_begin_subtest "Search by address:"
+output=$(notmuch search from:bugs@quoting.com | notmuch_search_sanitize)
+test_expect_equal_failure "$output" "thread:XXX 2001-01-05 [1/1] Some.Name for Someone; This message needs more quoting on the From line (inbox unread)
+thread:XXX 2001-01-05 [1/1] Some.Name for Someone; This message has necessary quoting in place (inbox unread)"
+
+test_begin_subtest "Search for all messages:"
+output=$(notmuch search '*' | notmuch_search_sanitize)
+test_expect_equal_failure "$output" "thread:XXX 2001-01-05 [1/1] Some.Name for Someone; This message needs more quoting on the From line (inbox unread)
+thread:XXX 2001-01-05 [1/1] Some.Name for Someone; This message has necessary quoting in place (inbox unread)
+thread:XXX 2001-01-05 [1/1] No.match Here; This message needs more quoting on the From line (inbox unread)
+thread:XXX 2001-01-05 [1/1] No.match Here; This message has necessary quoting in place (inbox unread)"
+
+test_done