Skip to content
This repository has been archived by the owner on Sep 8, 2022. It is now read-only.

Commit

Permalink
Add failing test for conditional with require macros
Browse files Browse the repository at this point in the history
  • Loading branch information
camsaul committed Jun 18, 2021
1 parent 56f8ddd commit 195c888
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(ns good-conditionals.conditional-with-require-macros
(:require [clojure.string :as str])
#?(:cljs (:require-macros [good-conditionals.conditional-with-require-macros :refer [my-when]])))

#?(:clj
(defmacro my-when [x]
`(when true
~x)))

(defn hello []
(my-when (println (str/join) "H" "ello")))
2 changes: 1 addition & 1 deletion test/check_namespace_decls/core_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
(deftest good-conditionals
(with-project [project ["good_conditionals" {:prefix-rewriting false}]]
(is (nil? (check-decls project)))
(is (= ["Checked 1 files; 0 had errors."]
(is (= ["Checked 2 files; 0 had errors."]
(capture-output #(check-decls project))))))

(deftest good-prefixes
Expand Down

0 comments on commit 195c888

Please sign in to comment.