#!/usr/bin/env bash
test_description="--format=json output"
. $(dirname "$0")/test-lib.sh || exit 1
+. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
test_begin_subtest "Show message: json"
add_message "[subject]=\"json-show-subject\"" "[date]=\"Sat, 01 Jan 2000 12:00:00 -0000\"" "[bcc]=\"test_suite+bcc@notmuchmail.org\"" "[reply-to]=\"test_suite+replyto@notmuchmail.org\"" "[body]=\"json-show-message\""
\"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\",