mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-25 04:18:08 +01:00
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.
This commit is contained in:
parent
99ad348deb
commit
f14d4c55ce
3 changed files with 45 additions and 46 deletions
|
@ -23,7 +23,7 @@ TESTS="
|
||||||
search-output
|
search-output
|
||||||
search-by-folder
|
search-by-folder
|
||||||
search-position-overlap-bug
|
search-position-overlap-bug
|
||||||
search-lwn
|
search-insufficient-from-quoting
|
||||||
json
|
json
|
||||||
thread-naming
|
thread-naming
|
||||||
raw
|
raw
|
||||||
|
|
44
test/search-insufficient-from-quoting
Executable file
44
test/search-insufficient-from-quoting
Executable file
|
@ -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
|
|
@ -1,45 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
test_description='searching for messages from lwn.net'
|
|
||||||
. ./test-lib.sh
|
|
||||||
|
|
||||||
add_message \
|
|
||||||
'[from]="LWN.net Weekly Notification <lwn@lwn.net>"' \
|
|
||||||
'[subject]="LWN.net Weekly Edition for January 27, 2011 available"'
|
|
||||||
add_message \
|
|
||||||
'[from]="LWN.net Mailing Lists <lwn@lwn.net>"' \
|
|
||||||
'[subject]="LWN.net newly freed content for January 27, 2011"'
|
|
||||||
|
|
||||||
test_begin_subtest "LWN, I:"
|
|
||||||
output=$(notmuch search from:'lwn.net weekly notification' | notmuch_search_sanitize)
|
|
||||||
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Weekly Notification; LWN.net Weekly Edition for January 27, 2011 available (inbox unread)"
|
|
||||||
|
|
||||||
test_begin_subtest "LWN, II:"
|
|
||||||
output=$(notmuch search from:'lwn.net mailing lists' | notmuch_search_sanitize)
|
|
||||||
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Mailing Lists; LWN.net newly freed content for January 27, 2011 (inbox unread)"
|
|
||||||
|
|
||||||
test_begin_subtest "LWN, III:"
|
|
||||||
output=$(notmuch search from:lwn and from:weekly | notmuch_search_sanitize)
|
|
||||||
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Weekly Notification; LWN.net Weekly Edition for January 27, 2011 available (inbox unread)"
|
|
||||||
|
|
||||||
test_begin_subtest "LWN, IV:"
|
|
||||||
output=$(notmuch search from:lwn and from:mailing | notmuch_search_sanitize)
|
|
||||||
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Mailing Lists; LWN.net newly freed content for January 27, 2011 (inbox unread)"
|
|
||||||
|
|
||||||
test_begin_subtest "LWN, V:"
|
|
||||||
output=$(notmuch search from:lwn@lwn.net and subject:weekly | notmuch_search_sanitize)
|
|
||||||
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Weekly Notification; LWN.net Weekly Edition for January 27, 2011 available (inbox unread)"
|
|
||||||
|
|
||||||
test_begin_subtest "LWN, VI:"
|
|
||||||
output=$(notmuch search from:lwn@lwn.net and subject:mailing | notmuch_search_sanitize)
|
|
||||||
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Mailing Lists; LWN.net newly freed content for January 27, 2011 (inbox unread)"
|
|
||||||
|
|
||||||
test_begin_subtest "LWN, VII:"
|
|
||||||
output=$(notmuch count from:lwn@lwn.net)
|
|
||||||
test_expect_equal "$output" 2
|
|
||||||
|
|
||||||
test_begin_subtest 'Search for all messages ("*")'
|
|
||||||
output=$(notmuch search '*' | notmuch_search_sanitize)
|
|
||||||
test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] LWN.net Weekly Notification; LWN.net Weekly Edition for January 27, 2011 available (inbox unread)
|
|
||||||
thread:XXX 2001-01-05 [1/1] LWN.net Mailing Lists; LWN.net newly freed content for January 27, 2011 (inbox unread)"
|
|
||||||
|
|
||||||
test_done
|
|
Loading…
Reference in a new issue