Skip to content

Commit 6eedd0a

Browse files
raymcdermottswannodette
authored andcommitted
CLJS-2915: Tests fail if directory has a period (.) in the path
We replace the periods with hyphens. We then leverage the cond-> to selectively transform to underscores. I coded this specific `replace` as char / char - which is different from the string / srting pattern used in the rest of the pipeline - as it feels simpler than the equivalent regex.
1 parent cad53c6 commit 6eedd0a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/clojure/cljs/module_processing_tests.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
(.getAbsolutePath $)
3737
(subs $ 0 (.lastIndexOf $ (str File/separator)))
3838
(string/replace $ "/" "$")
39+
(string/replace $ \. \-)
3940
(cond-> $ code? (string/replace "-" "_"))
4041
;; Windows
4142
(string/replace $ "\\" "$")

0 commit comments

Comments
 (0)