Add/Fix: Set case-fold for preambles
And use for (todo) preambles.
This commit is contained in:
parent
6e4ce26f45
commit
8f2a02264f
3 changed files with 41 additions and 27 deletions
|
|
@ -198,22 +198,34 @@ RESULTS should be a list of strings as returned by
|
|||
(describe "(level)"
|
||||
(it "with a number"
|
||||
(expect (org-ql--query-preamble '(level 2))
|
||||
:to-equal `(t ,(rx bol (repeat 2 "*") " "))))
|
||||
:to-equal (list :query t
|
||||
:preamble (rx bol (repeat 2 "*") " ")
|
||||
:preamble-case-fold t)))
|
||||
(it "with two numbers"
|
||||
(expect (org-ql--query-preamble '(level 2 4))
|
||||
:to-equal `(t ,(rx bol (repeat 2 4 "*") " "))))
|
||||
:to-equal (list :query t
|
||||
:preamble (rx bol (repeat 2 4 "*") " ")
|
||||
:preamble-case-fold t)))
|
||||
(it "<"
|
||||
(expect (org-ql--query-preamble '(level < 3))
|
||||
:to-equal `(t ,(rx bol (repeat 1 2 "*") " "))))
|
||||
:to-equal (list :query t
|
||||
:preamble (rx bol (repeat 1 2 "*") " ")
|
||||
:preamble-case-fold t)))
|
||||
(it "<="
|
||||
(expect (org-ql--query-preamble '(level <= 2))
|
||||
:to-equal `(t ,(rx bol (repeat 1 2 "*") " "))))
|
||||
:to-equal (list :query t
|
||||
:preamble (rx bol (repeat 1 2 "*") " ")
|
||||
:preamble-case-fold t)))
|
||||
(it ">"
|
||||
(expect (org-ql--query-preamble '(level > 2))
|
||||
:to-equal `(t ,(rx bol (>= 3 "*") " "))))
|
||||
:to-equal (list :query t
|
||||
:preamble (rx bol (>= 3 "*") " ")
|
||||
:preamble-case-fold t)))
|
||||
(it ">="
|
||||
(expect (org-ql--query-preamble '(level >= 2))
|
||||
:to-equal `(t ,(rx bol (>= 2 "*") " "))))))
|
||||
:to-equal (list :query t
|
||||
:preamble (rx bol (>= 2 "*") " ")
|
||||
:preamble-case-fold t)))))
|
||||
|
||||
(describe "Query results"
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue