Skip to content

Commit 9e5d08f

Browse files
committed
Truncate persistent test file
Otherwise we may be comparing the output of the last run of the test.
1 parent e316b2e commit 9e5d08f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clj/src/vim_clojure_static/test.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,11 @@
8080
[(concat strings ss)
8181
(conj contexts {:fmt fmt :ss ss :λs λs})]))
8282
[[] []] body)
83+
test-file (str "tmp/" name ".clj")
8384
syntable (gensym "syntable")]
8485
`(test/deftest ~name
85-
(let [~syntable (syn-id-names (str "tmp/" ~(str name) ".clj") ~@strings)]
86+
(spit ~test-file "")
87+
(let [~syntable (syn-id-names ~test-file ~@strings)]
8688
~@(map (fn [{:keys [fmt ss λs]}]
8789
`(test/testing ~fmt
8890
~@(map (fn [s λ] `(test/is ( (subfmt ~fmt (get ~syntable ~s)))))

0 commit comments

Comments
 (0)