Skip to content

Commit

Permalink
Test setting a limit on the matches
Browse files Browse the repository at this point in the history
  • Loading branch information
matsl committed Mar 31, 2024
1 parent 9353ef3 commit aee69d0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/hyrolo-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
;; Author: Mats Lidell <matsl@gnu.org>
;;
;; Orig-Date: 19-Jun-21 at 22:42:00
;; Last-Mod: 31-Mar-24 at 22:29:30 by Mats Lidell
;; Last-Mod: 31-Mar-24 at 22:29:58 by Mats Lidell
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
Expand Down Expand Up @@ -1636,7 +1636,6 @@ body

(ert-deftest hyrolo-test--grep-count ()
"Verify number of matched entries are correct."
:expected-result :failed
(unwind-protect
(with-temp-buffer
(org-mode)
Expand All @@ -1652,8 +1651,8 @@ match
(should (= (hyrolo-grep "match" nil (current-buffer) t nil) 3))
;; Count number of entries that only match on the first line
(should (= (hyrolo-grep "match" nil (current-buffer) t t) 2))
;; Count number of entries that match but not on the first line
(should (= (hyrolo-grep "match" t (current-buffer) t nil) 2))
;; Count max number of entries
(should (= (hyrolo-grep "match" 1 (current-buffer) t nil) 1))
;; Nothing if there is no match
(should (= (hyrolo-grep "nothing" nil (current-buffer) t nil) 0)))
(and (get-buffer hyrolo-display-buffer)
Expand Down

0 comments on commit aee69d0

Please sign in to comment.