Skip to content

Commit

Permalink
Tests: (src) Normalization with no args
Browse files Browse the repository at this point in the history
Closes #293.  Thanks to Akira Komamura (@akirak) for reporting.
  • Loading branch information
alphapapa committed Mar 9, 2023
1 parent 23fa648 commit eca1c6a
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 31 deletions.
2 changes: 1 addition & 1 deletion README.org
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ Simple links may also be written manually in either sexp or non-sexp form, like:
+ Predicate ~src~ now matches case-insensitively.

*Fixed*
+ Predicate ~src~'s matching of begin/end block lines, normalization of arguments, and handling in non-sexp queries.
+ Predicate ~src~'s matching of begin/end block lines, normalization of arguments, and handling in non-sexp queries. (Thanks to [[https://github.com/akirak][Akira Komamura]] for reporting.)
+ Predicate ~src~'s behavior with various arguments.

*Internal*
Expand Down
61 changes: 31 additions & 30 deletions org-ql.info
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,8 @@ File: README.info, Node: 07-pre, Next: 063, Up: Changelog

*Fixed*
• Predicate ‘src’’s matching of begin/end block lines, normalization
of arguments, and handling in non-sexp queries.
of arguments, and handling in non-sexp queries. (Thanks to Akira
Komamura (https://github.com/akirak) for reporting.)
• Predicate ‘src’’s behavior with various arguments.

*Internal*
Expand Down Expand Up @@ -1726,35 +1727,35 @@ Node: Links37140
Node: Tips37827
Node: Changelog38151
Node: 07-pre38934
Node: 06341323
Node: 06241858
Node: 06142163
Node: 0642731
Node: 05245785
Node: 05146085
Node: 0546508
Node: 04948037
Node: 04848317
Node: 04748666
Node: 04649075
Node: 04549483
Node: 04449844
Node: 04350203
Node: 04250406
Node: 04150567
Node: 0450814
Node: 03254915
Node: 03155318
Node: 0355515
Node: 02358815
Node: 02259049
Node: 02159329
Node: 0259534
Node: 0163612
Node: Notes63713
Node: Comparison with Org Agenda searches63875
Node: org-sidebar64764
Node: License65043
Node: 06341399
Node: 06241934
Node: 06142239
Node: 0642807
Node: 05245861
Node: 05146161
Node: 0546584
Node: 04948113
Node: 04848393
Node: 04748742
Node: 04649151
Node: 04549559
Node: 04449920
Node: 04350279
Node: 04250482
Node: 04150643
Node: 0450890
Node: 03254991
Node: 03155394
Node: 0355591
Node: 02358891
Node: 02259125
Node: 02159405
Node: 0259610
Node: 0163688
Node: Notes63789
Node: Comparison with Org Agenda searches63951
Node: org-sidebar64840
Node: License65119

End Tag Table

Expand Down
3 changes: 3 additions & 0 deletions tests/test-org-ql.el
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,9 @@ with keyword arg NOW in PLIST."
(it "normalizes non-keyword args with a :lang keyword arg to keywords"
(expect (org-ql--normalize-query '(src "foo" "bar" :lang "baz"))
:to-equal '(src :lang "baz" :regexps '("foo" "bar"))))
(it "normalizes zero args without looping"
(expect (org-ql--normalize-query '(src))
:to-equal '(src)))
(it "normalizes all-keyword args without looping"
(expect (org-ql--normalize-query '(src :regexps ("foo") :lang "bar"))
:to-equal '(src :lang "bar" :regexps '("foo")))
Expand Down

0 comments on commit eca1c6a

Please sign in to comment.