]> git.notmuchmail.org Git - notmuch/blobdiff - test/json
json: Fix search result with no matches to be a valid json object.
[notmuch] / test / json
index 7fe2a27a8d6479bfd32c0d03b1c68b23ff7bf26f..307cd1e6c927e3c655b273076c55e5ec436d2d06 100755 (executable)
--- a/test/json
+++ b/test/json
@@ -39,4 +39,8 @@ test_expect_equal "$output" "[{\"thread\": \"XXX\",
 \"subject\": \"json-search-utf8-body-sübjéct\",
 \"tags\": [\"inbox\", \"unread\"]}]"
 
+test_begin_subtest "Search returning no messages"
+output=$(notmuch search --format=json "this string had better not match any messages" | notmuch_search_sanitize)
+test_expect_equal "$output" "[]"
+
 test_done