Skip to content

Commit

Permalink
Fix #20: top-level sexprs which aren't seqable
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdowney committed Apr 12, 2023
1 parent de95ec3 commit a8711e9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/com/mjdowney/rich_comment_tests.clj
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"Is the node at the `zloc` a ^:rct/test (comment ...) block?"
[zloc]
(when-let [sexpr (when (z/sexpr-able? zloc) (z/sexpr zloc))]
(and (= (first sexpr) 'comment) (:rct/test (meta sexpr)))))
(and (seqable? sexpr) (= (first sexpr) 'comment) (:rct/test (meta sexpr)))))

(defn iterate1
"Like `clojure.core/iterate`, but stops at the first `nil` element."
Expand Down Expand Up @@ -471,3 +471,8 @@

(comment ;; For example...
(run-ns-tests! *ns*))

; N.B. leaving these top-level literals to catch regressions of a bug
; where RCT would assume all sexprable top level forms are countable.
1
\x

0 comments on commit a8711e9

Please sign in to comment.