X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=test%2FT160-json.sh;h=e8b75605fd2a391eaa0c51351d8f8bd6e0d80499;hp=004adb4ee4dfe53695a34de8e3dabad8770cffed;hb=f25fc8e2115fc0fa6fa2a6d1cf3ed2747e163886;hpb=4cb789aa090fb6ba3c7897584ecbcc0a547b2f81 diff --git a/test/T160-json.sh b/test/T160-json.sh index 004adb4e..e8b75605 100755 --- a/test/T160-json.sh +++ b/test/T160-json.sh @@ -64,6 +64,23 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\", \"tags\": [\"inbox\", \"unread\"]}]" +test_begin_subtest "Search message: json, 64-bit timestamp" +if [ $NOTMUCH_HAVE_64BIT_TIME_T -ne 1 ]; then + test_subtest_known_broken +fi +add_message "[subject]=\"json-search-64bit-timestamp-subject\"" "[date]=\"Tue, 01 Jan 2999 12:00:00 -0000\"" "[body]=\"json-search-64bit-timestamp-message\"" +output=$(notmuch search --format=json "json-search-64bit-timestamp-message" | notmuch_search_sanitize) +test_expect_equal_json "$output" "[{\"thread\": \"XXX\", + \"timestamp\": 32472187200, + \"date_relative\": \"the future\", + \"matched\": 1, + \"total\": 1, + \"authors\": \"Notmuch Test Suite\", + \"subject\": \"json-search-64bit-timestamp-subject\", + \"query\": [\"id:$gen_msg_id\", null], + \"tags\": [\"inbox\", + \"unread\"]}]" + test_begin_subtest "Format version: too low" test_expect_code 20 "notmuch search --format-version=0 \\*"