aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2016-07-08 11:15:36 +0200
committerDavid Bremner <david@tethera.net>2016-09-21 18:14:25 -0300
commit693ca8d8a80438ce1e361e7e6d22288f52a11c55 (patch)
tree447bce9c213a5662f86af02c91cfd3f827dad4f8 /test
parent651da30c0941081cf730930fc1a7cac34954ca0e (diff)
add property: query prefix to search for specific properties
We want to be able to query the properties directly, like: notmuch count property:foo=bar which should return a count of messages where the property with key "foo" has value equal to "bar".
Diffstat (limited to 'test')
-rwxr-xr-xtest/T610-message-property.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/T610-message-property.sh b/test/T610-message-property.sh
index c92b99ba..65ff19dc 100755
--- a/test/T610-message-property.sh
+++ b/test/T610-message-property.sh
@@ -237,4 +237,15 @@ notmuch restore < BEFORE2
notmuch dump | grep '^#=' > OUTPUT
test_expect_equal_file PROPERTIES OUTPUT
+test_begin_subtest "test 'property:' queries: empty"
+notmuch search property:testkey1=charles > OUTPUT
+test_expect_equal_file /dev/null OUTPUT
+
+test_begin_subtest "test 'property:' queries: single message"
+notmuch search --output=messages property:testkey1=alice > OUTPUT
+cat <<EOF >EXPECTED
+id:4EFC743A.3060609@april.org
+EOF
+test_expect_equal_file EXPECTED OUTPUT
+
test_done