From a8711e9a89e4a51260d6c50d388c415a15e77d45 Mon Sep 17 00:00:00 2001 From: Matthew Downey Date: Wed, 12 Apr 2023 11:04:07 -0400 Subject: [PATCH] Fix #20: top-level sexprs which aren't seqable --- src/com/mjdowney/rich_comment_tests.clj | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/com/mjdowney/rich_comment_tests.clj b/src/com/mjdowney/rich_comment_tests.clj index 7e9ddbb..39e135a 100644 --- a/src/com/mjdowney/rich_comment_tests.clj +++ b/src/com/mjdowney/rich_comment_tests.clj @@ -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." @@ -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