File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 99 [eca.llm-api :as llm-api]
1010 [eca.shared :refer [multi-str]]
1111 [eca.test-helper :as h]
12- [matcher-combinators.test :refer [match?] ]
13- [matcher-combinators.matchers :as m ]))
12+ [matcher-combinators.matchers :as m ]
13+ [matcher-combinators.test :refer [match?] ]))
1414
1515(h/reset-components-before-test )
1616
Original file line number Diff line number Diff line change 1010
1111(def windows? (string/starts-with? (System/getProperty " os.name" ) " Windows" ))
1212
13+ (def windows-drive-letter
14+ (when windows?
15+ (second (re-find #"^([A-Za-z]).+" (System/getProperty " user.dir" )))))
16+
17+
18+
1319(defn file-path [path]
1420 (cond-> path windows?
15- (-> (string/replace-first #"^/" " C :\\\\ " )
21+ (-> (string/replace-first #"^/" ( str windows-drive-letter " :\\\\ " ) )
1622 (->> (re-matches #"(.+?)(\. jar:.*)?" ))
1723 (update 1 string/replace " /" " \\ " )
1824 rest
1925 (->> (apply str)))))
2026
2127(defn file-uri [uri]
2228 (cond-> uri windows?
23- (string/replace #"^(file):///(?!\w :/)" " $1:///C :/" )))
29+ (string/replace #"^(file):///(?!\w :/)" ( str " $1:///" windows-drive-letter " :/" ) )))
2430
2531(defrecord TestMessenger [messages* diagnostics*]
2632 messenger /IMessenger
You can’t perform that action at this time.
0 commit comments