[PATCH v1 3/3] test: Update tests for :authors_matched and :authors_non_matched.
David Edmondson
dme at dme.org
Fri Oct 24 01:48:08 PDT 2014
---
test/T160-json.sh | 4 ++++
test/T170-sexp.sh | 4 ++--
test/T470-missing-headers.sh | 4 ++++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/test/T160-json.sh b/test/T160-json.sh
index c1cf649..d3cf2e7 100755
--- a/test/T160-json.sh
+++ b/test/T160-json.sh
@@ -25,6 +25,8 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",
\"matched\": 1,
\"total\": 1,
\"authors\": \"Notmuch Test Suite\",
+ \"authors_matched\": \"Notmuch Test Suite\",
+ \"authors_non_matched\": \"\",
\"subject\": \"json-search-subject\",
\"query\": [\"id:$gen_msg_id\", null],
\"tags\": [\"inbox\",
@@ -59,6 +61,8 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",
\"matched\": 1,
\"total\": 1,
\"authors\": \"Notmuch Test Suite\",
+ \"authors_matched\": \"Notmuch Test Suite\",
+ \"authors_non_matched\": \"\",
\"subject\": \"json-search-utf8-body-sübjéct\",
\"query\": [\"id:$gen_msg_id\", null],
\"tags\": [\"inbox\",
diff --git a/test/T170-sexp.sh b/test/T170-sexp.sh
index 667e319..8a57b74 100755
--- a/test/T170-sexp.sh
+++ b/test/T170-sexp.sh
@@ -19,7 +19,7 @@ test_expect_equal "$output" "((((:id \"${gen_msg_id}\" :match t :excluded nil :f
test_begin_subtest "Search message: sexp"
add_message "[subject]=\"sexp-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"sexp-search-message\""
output=$(notmuch search --format=sexp "sexp-search-message" | notmuch_search_sanitize)
-test_expect_equal "$output" "((:thread \"0000000000000002\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :subject \"sexp-search-subject\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"
+test_expect_equal "$output" "((:thread \"0000000000000002\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :authors_matched \"Notmuch Test Suite\" :authors_non_matched \"\" :subject \"sexp-search-subject\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"
test_begin_subtest "Show message: sexp, utf-8"
add_message "[subject]=\"sexp-show-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-show-méssage\""
@@ -44,7 +44,7 @@ test_expect_equal "$output" "((((:id \"$id\" :match t :excluded nil :filename \"
test_begin_subtest "Search message: sexp, utf-8"
add_message "[subject]=\"sexp-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[body]=\"jsön-search-méssage\""
output=$(notmuch search --format=sexp "jsön-search-méssage" | notmuch_search_sanitize)
-test_expect_equal "$output" "((:thread \"0000000000000005\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :subject \"sexp-search-utf8-body-sübjéct\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"
+test_expect_equal "$output" "((:thread \"0000000000000005\" :timestamp 946728000 :date_relative \"2000-01-01\" :matched 1 :total 1 :authors \"Notmuch Test Suite\" :authors_matched \"Notmuch Test Suite\" :authors_non_matched \"\" :subject \"sexp-search-utf8-body-sübjéct\" :query (\"id:$gen_msg_id\" nil) :tags (\"inbox\" \"unread\")))"
test_done
diff --git a/test/T470-missing-headers.sh b/test/T470-missing-headers.sh
index cb38301..5d66e7e 100755
--- a/test/T470-missing-headers.sh
+++ b/test/T470-missing-headers.sh
@@ -34,6 +34,8 @@ test_expect_equal_json "$output" '
[
{
"authors": "",
+ "authors_matched": "",
+ "authors_non_matched": "",
"date_relative": "2001-01-05",
"matched": 1,
"subject": "",
@@ -48,6 +50,8 @@ test_expect_equal_json "$output" '
},
{
"authors": "Notmuch Test Suite",
+ "authors_matched": "Notmuch Test Suite",
+ "authors_non_matched": "",
"date_relative": "1970-01-01",
"matched": 1,
"subject": "",
--
2.1.1
More information about the notmuch
mailing list