Skip to content

Commit

Permalink
Allow using explicit nil to show not testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
okamsn committed Aug 6, 2023
1 parent 264b915 commit 6ce07f8
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions tests/tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,20 @@ prefix the items in LOOPY or ITER-BARE."
(unless body
(error "Must include `body'"))

(when (eq loopy t) (setq loopy nil))

(when (eq iter-bare t) (setq iter-bare nil))

(cond ((eq iter-keyword t)
(setq iter-keyword (or loopy iter-bare)))

((symbolp (car iter-keyword))
(setq iter-keyword (cl-loop for sym in iter-keyword
collect (cons sym sym)))))
(pcase loopy
((pred (eq t)) (setq loopy nil))
((pred (eq nil)) (setq loopy-provided nil)))

(pcase iter-bare
((pred (eq t)) (setq iter-bare nil))
((pred (eq nil)) (setq iter-bare-provided nil)))

(pcase iter-keyword
((pred (eq t)) (setq iter-keyword (or loopy iter-bare)))
((pred (eq nil)) (setq iter-keyword-provided nil))
(`(,(pred symbolp) . ,_)
(setq iter-keyword (cl-loop for sym in iter-keyword
collect (cons sym sym)))))

(when (eq error t)
(setq error 'error))
Expand Down

0 comments on commit 6ce07f8

Please sign in to comment.