]> git.notmuchmail.org Git - notmuch/commitdiff
test: date_relative in notmuch search json output
authorpazz <patricktotzke@googlemail.com>
Sat, 23 Jul 2011 09:54:03 +0000 (10:54 +0100)
committerDavid Bremner <bremner@debian.org>
Thu, 8 Dec 2011 01:19:40 +0000 (21:19 -0400)
expect the date_relative field for thread entries
in notmuch search's json output

note from Commiter: we don't have to worry about the date changing
because the date in question is more than 180 days old.

test/json

index 592b06872d85fc3e0e4af14e1f3ef054c09642e7..7df438036583b7b487632731083e11c58165d8dd 100755 (executable)
--- a/test/json
+++ b/test/json
@@ -12,6 +12,7 @@ add_message "[subject]=\"json-search-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00
 output=$(notmuch search --format=json "json-search-message" | notmuch_search_sanitize)
 test_expect_equal "$output" "[{\"thread\": \"XXX\",
 \"timestamp\": 946728000,
+\"date_relative\": \"2000-01-01\",
 \"matched\": 1,
 \"total\": 1,
 \"authors\": \"Notmuch Test Suite\",
@@ -41,6 +42,7 @@ add_message "[subject]=\"json-search-utf8-body-sübjéct\"" "[date]=\"Sat, 01 Ja
 output=$(notmuch search --format=json "jsön-search-méssage" | notmuch_search_sanitize)
 test_expect_equal "$output" "[{\"thread\": \"XXX\",
 \"timestamp\": 946728000,
+\"date_relative\": \"2000-01-01\",
 \"matched\": 1,
 \"total\": 1,
 \"authors\": \"Notmuch Test Suite\",