aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorPeter Wang <novalazy@gmail.com>2020-02-08 12:49:21 +1100
committerDavid Bremner <david@tethera.net>2020-02-13 19:08:56 -0400
commite091427d98b0c49e96fb312ad1af6862776b896a (patch)
tree6cdc4efb85b0bc35ee89eba69c336ce9bb8cf641 /test
parentaba7fb375bf4edad5da40134b4e7a390a881792b (diff)
test: add known broken test with timestamp beyond 2038
Diffstat (limited to 'test')
-rwxr-xr-xtest/T160-json.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/T160-json.sh b/test/T160-json.sh
index 004adb4e..ec1b5adb 100755
--- a/test/T160-json.sh
+++ b/test/T160-json.sh
@@ -64,6 +64,21 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\",
\"tags\": [\"inbox\",
\"unread\"]}]"
+test_begin_subtest "Search message: json, 64-bit timestamp"
+test_subtest_known_broken
+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 \\*"