Skip to content

Commit 7f1d6c9

Browse files
committed
changed get-tests slightly to be closer to what I want
re ADWolf:#1354
1 parent 0850639 commit 7f1d6c9

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

lisp-unit.lisp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,15 @@
133133
"
134134
(%log-around (#?"get-tests:${tests} tags:${tags} package:${package} reintern-package:${reintern-package} exclude-tags:${exclude-tags} exclude-tests:${ exclude-tests }"
135135
:start-level 0)
136-
136+
(setf tests (alexandria:ensure-list tests)
137+
tags (alexandria:ensure-list tags)
138+
exclude-tests (alexandria:ensure-list exclude-tests)
139+
exclude-tags (alexandria:ensure-list exclude-tags))
137140
(when reintern-package
138-
(setf tests (alexandria:ensure-list
139-
(%in-package tests reintern-package)))
140-
(setf tags (alexandria:ensure-list
141-
(%in-package tags reintern-package)))
142-
(setf exclude-tests (alexandria:ensure-list
143-
(%in-package exclude-tests reintern-package)))
144-
(setf exclude-tags (alexandria:ensure-list
145-
(%in-package exclude-tags reintern-package))))
141+
(setf tests (%in-package tests reintern-package))
142+
(setf tags (%in-package tags reintern-package))
143+
(setf exclude-tests (%in-package exclude-tests reintern-package))
144+
(setf exclude-tags (%in-package exclude-tags reintern-package)))
146145
;; defaults to pulling up all tests in the current package
147146
(when (and (null tests) (null tags) (null package))
148147
(setf package (package-name *package*)))
@@ -156,8 +155,9 @@
156155
(for test = (%to-test name))
157156
(gathered test))
158157
(flet ((excluded? (test)
159-
(or (and (find (name test) exclude-tests)
160-
(not (find (name test) tests)))
158+
(when (find (name test) tests)
159+
(return-from excluded? nil))
160+
(or (find (name test) exclude-tests)
161161
(iter (for tag in (tags test))
162162
(thereis (and (find tag exclude-tags)
163163
(not (find tag tags))))))))

0 commit comments

Comments
 (0)