Fix: Ignore empty quoted strings when parsing string queries
Fixes #383. Reported-by: Adam Porter <adam@alphapapa.net>
This commit is contained in:
parent
5775848b8a
commit
7a6b622cd0
3 changed files with 26 additions and 3 deletions
|
|
@ -648,6 +648,14 @@ with keyword arg NOW in PLIST."
|
|||
|
||||
;; TODO: Other predicates.
|
||||
|
||||
(it "Ignores empty quoted strings"
|
||||
(expect (org-ql--query-string-to-sexp "\"\"")
|
||||
:to-equal nil)
|
||||
(expect (org-ql--query-string-to-sexp "foo \"\" bar")
|
||||
:to-equal '(and (rifle "foo") (rifle "bar")))
|
||||
(expect (org-ql--query-string-to-sexp "foo \"baz\" bar")
|
||||
:to-equal '(and (rifle "foo") (rifle "baz") (rifle "bar"))))
|
||||
|
||||
(it "Negated terms"
|
||||
(expect (org-ql--query-string-to-sexp "todo: !todo:CHECK,SOMEDAY")
|
||||
:to-equal '(and (todo) (not (todo "CHECK" "SOMEDAY"))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue