Skip to content

Commit

Permalink
tests: Add backtrace tests for function matchers
Browse files Browse the repository at this point in the history
Function matchers (expect A (lambda (x y z) (< x y z)) B C) is an
obscure feature of buttercup. An interesting fact is that the wrapped
arguments are evaluated _before_ the matcher is called in contrast to
matchers defined with buttercup-define-matcher where the matcher is
assumed to do that itself.
  • Loading branch information
snogge committed Sep 4, 2024
1 parent 19e1a86 commit 925af15
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test-buttercup.el
Original file line number Diff line number Diff line change
Expand Up @@ -2198,7 +2198,9 @@ before it's processed by other functions."
(matcher-spec ":to-have-been-called-with" :to-have-been-called-with 2)
(matcher-spec ":not :to-have-been-called-with" :not :to-have-been-called-with 2)
(matcher-spec ":to-have-been-called-times" :to-have-been-called-times 2)
(matcher-spec ":not :to-have-been-called-times" :not :to-have-been-called-times 2))))
(matcher-spec ":not :to-have-been-called-times" :not :to-have-been-called-times 2)
(matcher-spec "function matcher" (lambda (_) t))
(matcher-spec ":not function matcher" :not (lambda (_) nil)))))


(describe "When using quiet specs in the batch reporter"
Expand Down

0 comments on commit 925af15

Please sign in to comment.