diff options
| author | David Bremner <david@tethera.net> | 2022-06-04 18:53:58 -0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2022-06-25 19:49:55 -0300 |
| commit | e7ffb7404163ebb453c96f6af9724e0fba75abb0 (patch) | |
| tree | f2b32349cd111825142b3ac0a5587fbcb71b8175 /test | |
| parent | 78632345868b5e4753ad402c806c29569946ce89 (diff) | |
lib/sexp: allow * as alias for "" in range searches.
It can be tedious to use "" inside of a string, e.g. in a shell script.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/T081-sexpr-search.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/T081-sexpr-search.sh b/test/T081-sexpr-search.sh index 896ffe5d..1b036a0d 100755 --- a/test/T081-sexpr-search.sh +++ b/test/T081-sexpr-search.sh @@ -864,6 +864,16 @@ notmuch search date:..2009-11-17 and from:keithp | notmuch_search_sanitize > EXP notmuch search --query=sexp '(and (date "" 2009-11-17) (from keithp))' | notmuch_search_sanitize > OUTPUT test_expect_equal_file_nonempty EXPECTED OUTPUT +test_begin_subtest "date query, lower bound only, using *" +notmuch search date:2009-11-18.. and from:keithp | notmuch_search_sanitize > EXPECTED +notmuch search --query=sexp '(and (date 2009-11-18 *) (from keithp))' | notmuch_search_sanitize > OUTPUT +test_expect_equal_file_nonempty EXPECTED OUTPUT + +test_begin_subtest "date query, upper bound only, using *" +notmuch search date:..2009-11-17 and from:keithp | notmuch_search_sanitize > EXPECTED +notmuch search --query=sexp '(and (date * 2009-11-17) (from keithp))' | notmuch_search_sanitize > OUTPUT +test_expect_equal_file_nonempty EXPECTED OUTPUT + test_begin_subtest "date query, illegal nesting 1" notmuch search --query=sexp '(to (date))' > OUTPUT 2>&1 cat <<EOF > EXPECTED @@ -941,6 +951,16 @@ notmuch search lastmod:..$revision2 | notmuch_search_sanitize > EXPECTED notmuch search --query=sexp "(lastmod \"\" $revision2)" | notmuch_search_sanitize > OUTPUT test_expect_equal_file_nonempty EXPECTED OUTPUT +test_begin_subtest "lastmod query, lower bound only, using *" +notmuch search lastmod:$revision.. | notmuch_search_sanitize > EXPECTED +notmuch search --query=sexp "(lastmod $revision *)" | notmuch_search_sanitize > OUTPUT +test_expect_equal_file_nonempty EXPECTED OUTPUT + +test_begin_subtest "lastmod query, upper bound only, using *" +notmuch search lastmod:..$revision2 | notmuch_search_sanitize > EXPECTED +notmuch search --query=sexp "(lastmod * $revision2)" | notmuch_search_sanitize > OUTPUT +test_expect_equal_file_nonempty EXPECTED OUTPUT + test_begin_subtest "lastmod query, illegal nesting 1" notmuch search --query=sexp '(to (lastmod))' > OUTPUT 2>&1 cat <<EOF > EXPECTED |
