diff --git a/sci b/sci index 584a4ab5..2b8751f8 160000 --- a/sci +++ b/sci @@ -1 +1 @@ -Subproject commit 584a4ab5fef1aaa84aedab29c28153c7b178eb59 +Subproject commit 2b8751f8443948e618dfab354e980aadc912dcc4 diff --git a/src/babashka/impl/clojure/test.clj b/src/babashka/impl/clojure/test.clj index 1507186e..2810192e 100644 --- a/src/babashka/impl/clojure/test.clj +++ b/src/babashka/impl/clojure/test.clj @@ -232,13 +232,13 @@ For additional event types, see the examples in the code. "} babashka.impl.clojure.test - (:require [babashka.impl.common :refer [ctx]] - [clojure.stacktrace :as stack] - [clojure.template :as temp] - [sci.core :as sci] - [sci.impl.namespaces :as sci-namespaces] - [sci.impl.resolve :as resolve] - [sci.impl.vars :as vars])) + (:require + [babashka.impl.common :refer [ctx]] + [clojure.stacktrace :as stack] + [clojure.template :as temp] + [sci.core :as sci] + [sci.impl.namespaces :as sci-namespaces] + [sci.impl.resolve :as resolve])) ;; Nothing is marked "private" here, so you can rebind things to plug ;; in your own testing or reporting frameworks. diff --git a/src/babashka/wait.clj b/src/babashka/wait.clj index 5cbea999..d8c4fe69 100644 --- a/src/babashka/wait.clj +++ b/src/babashka/wait.clj @@ -26,8 +26,9 @@ :wait-for-port.impl/timed-out :wait-for-port.impl/try-again))))] (cond (identical? :wait-for-port.impl/try-again v) - (do (Thread/sleep (or pause 100)) - (recur)) + (let [^long pause (or pause 100)] + (Thread/sleep pause) + (recur)) (identical? :wait-for-port.impl/timed-out v) default :else @@ -51,8 +52,9 @@ :wait-for-path.impl/timed-out :wait-for-path.impl/try-again)))] (cond (identical? :wait-for-path.impl/try-again v) - (do (Thread/sleep (or pause 100)) - (recur)) + (let [^long pause (or pause 100)] + (Thread/sleep pause) + (recur)) (identical? :wait-for-path.impl/timed-out v) default :else diff --git a/test-resources/line_number_test_test.clj b/test-resources/line_number_test_test.clj new file mode 100644 index 00000000..e3d3fdba --- /dev/null +++ b/test-resources/line_number_test_test.clj @@ -0,0 +1,7 @@ +(ns line-number-test-test + (:require [clojure.test :refer [is deftest run-tests]])) + +(deftest test-is + (is false)) + +(run-tests 'line-number-test-test) diff --git a/test/babashka/test_test.clj b/test/babashka/test_test.clj index d88c3fd5..08a58249 100644 --- a/test/babashka/test_test.clj +++ b/test/babashka/test_test.clj @@ -108,3 +108,7 @@ (t/with-test-out (t/run-tests *ns*))) (str/includes? (str sw) \"Ran 1 tests containing 2 assertions.\"))")] (is (str/includes? output "true")))) + +(deftest line-number-test + (is (str/includes? (bb "test-resources/line_number_test_test.clj") + "line_number_test_test.clj:4")))