Fix: (--pre-process-query) level predicate with args in plain query

Fixes #96.  Thanks to Akira Komamura (@akirak) for reporting.

Released as 0.4.1.
This commit is contained in:
Adam Porter 2020-02-23 23:22:11 -06:00
parent 538373bb48
commit 32c68d7f24
4 changed files with 83 additions and 47 deletions

View file

@ -216,7 +216,15 @@ RESULTS should be a list of strings as returned by
:order-by 'date))
:to-equal org-ql-test-num-headings)))
(it "Query pre-processing"
(describe "Query pre-processing"
(it "level:"
(expect (org-ql--pre-process-query '(level "1"))
:to-equal '(level 1))
(expect (org-ql--pre-process-query '(level "1" "2"))
:to-equal '(level 1 2))
(expect (org-ql--pre-process-query '(level ">" "1"))
:to-equal '(level > 1)))
(expect (org-ql--pre-process-query '(and "string1" "string2"))
:to-equal '(and (regexp "string1") (regexp "string2")))
(expect (org-ql--pre-process-query '(or "string1" "string2"))