File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed
apps/language_server/test/source_file Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -144,18 +144,19 @@ defmodule ElixirLS.LanguageServer.SourceFile.PathTest do
144
144
145
145
test "windows path" do
146
146
if is_windows ( ) do
147
- assert "file:///c%3A/win/path" == to_uri ( "c:/win/path" )
148
- assert "file:///c%3A/win/path" == to_uri ( "C:/win/path" )
149
- assert "file:///c%3A/win/path" == to_uri ( "c:/win/path/" )
150
- assert "file:///c%3A/win/path" == to_uri ( "/c:/win/path" )
147
+ drive_letter = Path . expand ( "/" ) |> String . split ( ":" ) |> hd ( )
148
+ assert "file:///#{ drive_letter } %3A/win/path" == to_uri ( "c:/win/path" )
149
+ assert "file:///#{ drive_letter } %3A/win/path" == to_uri ( "C:/win/path" )
150
+ assert "file:///#{ drive_letter } %3A/win/path" == to_uri ( "c:/win/path/" )
151
+ assert "file:///#{ drive_letter } %3A/win/path" == to_uri ( "/c:/win/path" )
151
152
152
- assert "file:///c %3A/win/path" == to_uri ( "c:\\ win\\ path" )
153
- assert "file:///c %3A/win/path" == to_uri ( "c:\\ win/path" )
153
+ assert "file:///#{ drive_letter } %3A/win/path" == to_uri ( "c:\\ win\\ path" )
154
+ assert "file:///#{ drive_letter } %3A/win/path" == to_uri ( "c:\\ win/path" )
154
155
155
- assert "file:///c %3A/test%20with%20%25/path" ==
156
+ assert "file:///#{ drive_letter } %3A/test%20with%20%25/path" ==
156
157
to_uri ( "c:\\ test with %\\ path" )
157
158
158
- assert "file:///c %3A/test%20with%20%2525/c%23code" ==
159
+ assert "file:///#{ drive_letter } %3A/test%20with%20%2525/c%23code" ==
159
160
to_uri ( "c:\\ test with %25\\ c#code" )
160
161
end
161
162
end
You can’t perform that action at this time.
0 commit comments