aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2021-08-24 08:17:14 -0700
committerDavid Bremner <david@tethera.net>2021-09-04 17:07:19 -0700
commite3b1a0a6a59691f6be9fd0cb3b0d01bb9a7fe2b7 (patch)
treef612542d279065e94f0e2c53173c51acc78feec1 /test
parentc4f2f33a50643b41e6dbf0519c563ae7db48beab (diff)
CLI/search+address: support sexpr queries
Initially support selection of query syntax in two subcommands to enable testing.
Diffstat (limited to 'test')
-rwxr-xr-xtest/T080-search.sh7
-rwxr-xr-xtest/T095-address.sh7
2 files changed, 14 insertions, 0 deletions
diff --git a/test/T080-search.sh b/test/T080-search.sh
index a3f0dead..9bda1eb9 100755
--- a/test/T080-search.sh
+++ b/test/T080-search.sh
@@ -189,4 +189,11 @@ test_begin_subtest "parts do not have adjacent term positions"
output=$(notmuch search id:termpos and '"c x"')
test_expect_equal "$output" ""
+if [[ NOTMUCH_HAVE_SFSEXP = 1 ]]; then
+ test_begin_subtest "sexpr query: all messages"
+ notmuch search '*' > EXPECTED
+ notmuch search --query=sexp '()' > OUTPUT
+ test_expect_equal_file EXPECTED OUTPUT
+fi
+
test_done
diff --git a/test/T095-address.sh b/test/T095-address.sh
index 817be538..8bb3627a 100755
--- a/test/T095-address.sh
+++ b/test/T095-address.sh
@@ -325,4 +325,11 @@ cat <<EOF >EXPECTED
EOF
test_expect_equal_file EXPECTED OUTPUT
+if [[ NOTMUCH_HAVE_SFSEXP = 1 ]]; then
+ test_begin_subtest "sexpr query: all messages"
+ notmuch address '*' > EXPECTED
+ notmuch address --query=sexp '()' > OUTPUT
+ test_expect_equal_file EXPECTED OUTPUT
+fi
+
test_done