Skip to content

Commit

Permalink
Less strict matches when checking for non-existence
Browse files Browse the repository at this point in the history
  • Loading branch information
pkryger committed Dec 12, 2024
1 parent 588e7fe commit ddfa447
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions init-vc-checkout.t.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,16 @@ Recursion is in order: FORM, (car FORM), (cdr FORM)."
(exordium-vc-checkout-t-recursive-find-if
(lambda (f)
(and (eq 'exordium--vc-checkout-install (car f))
(eq package (eval (cadr f)))
(equal dir (caddr f))))
(or (eq package 'any) (eq package (eval (cadr f))))
(or (eq dir 'any) (equal dir (caddr f)))))
form))


(ert-deftest exordium-vc-checkout-not-always-macroexpansion-no-keyword ()
(let ((exordium-always-vc-checkout nil)
(form '(use-package dummy-package)))
(should-not
(exordium--vc-checkout-install-exists 'dummy-package nil
(exordium--vc-checkout-install-exists 'any 'any
(macroexpand form)))))

(ert-deftest exordium-vc-checkout-always-macroexpansion-no-keyword ()
Expand Down Expand Up @@ -80,15 +80,15 @@ Recursion is in order: FORM, (car FORM), (cdr FORM)."
(form '(use-package dummy-package
:exordium-vc-checkout nil)))
(should-not
(exordium--vc-checkout-install-exists 'dummy-package nil
(exordium--vc-checkout-install-exists 'any 'any
(macroexpand form)))))

(ert-deftest exordium-vc-checkout-always-macroexpansion-nil ()
(let ((exordium-always-vc-checkout t)
(form '(use-package dummy-package
:exordium-vc-checkout nil)))
(should-not
(exordium--vc-checkout-install-exists 'dummy-package nil
(exordium--vc-checkout-install-exists 'any 'any
(macroexpand form)))))

(ert-deftest exordium-vc-checkout-not-always-macroexpansion-t ()
Expand Down

0 comments on commit ddfa447

Please sign in to comment.