Konrad Mrożek
2023-07-13 9ae31ad67fe1c4decfc8a262834085eab8a178db
clojure/src/test_runner.clj
@@ -36,13 +36,18 @@
(defmethod emacs-report :default
  [_])
(defn -main  [& [test-file]]
(defn- clj-file? [f]
  (re-matches #"^.*\.cljs?$" (.getName f)))
(defn -main  [& {:strs [-test-file] :or {-test-file "test"}}]
  (binding  [*compile-files* true]
    (compile 'test-runner)
    (let [test-files (->> (or test-file  "test")
    (println "Detecting test files in" -test-file)
    (let [test-files (->> -test-file
                          (java.io.File.)
                          (file-seq)
                          (filter (memfn isFile))
                          (filter clj-file?)
                          (map (memfn getAbsolutePath))
                          (set))]
      (println "Loading test files...")