aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2016-03-22 07:54:44 -0300
committerDavid Bremner <david@tethera.net>2016-05-08 08:17:07 -0300
commitbbf6069252d31e6693ee99cce8bf4f9fab47e360 (patch)
treef70aab9b342674e675ac3c5a3794f33b1b05cfae /test
parent1871be319a28d8bba8b368f6b056d2c8448afcf6 (diff)
lib: optionally support single argument date: queries
This relies on the FieldProcessor API, which is only present in xapian >= 1.3.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T500-search-date.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/T500-search-date.sh b/test/T500-search-date.sh
index f5cea421..198a2e60 100755
--- a/test/T500-search-date.sh
+++ b/test/T500-search-date.sh
@@ -12,6 +12,12 @@ test_begin_subtest "Absolute date range with 'same' operator"
output=$(notmuch search date:2010-12-16..! | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2010-12-16 [1/1] Olivier Berger; Essai accentué (inbox unread)"
+if [ "${NOTMUCH_HAVE_XAPIAN_FIELD_PROCESSOR}" = "1" ]; then
+ test_begin_subtest "Absolute date field"
+ output=$(notmuch search date:2010-12-16 | notmuch_search_sanitize)
+ test_expect_equal "$output" "thread:XXX 2010-12-16 [1/1] Olivier Berger; Essai accentué (inbox unread)"
+fi
+
test_begin_subtest "Absolute time range with TZ"
notmuch search date:18-Nov-2009_02:19:26-0800..2009-11-18_04:49:52-06:00 | notmuch_search_sanitize > OUTPUT
cat <<EOF >EXPECTED