Skip to content

Commit 5b2eb54

Browse files
committed
#2744: Ensure Path.relative_to is case insensitive on the drive letter
Signed-off-by: Mikhail S. Pobolovets <[email protected]>
1 parent bba0d12 commit 5b2eb54

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/elixir/test/elixir/path_test.exs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ defmodule PathTest do
3838
assert Path.relative("/usr/local/bin") == "usr/local/bin"
3939
assert Path.relative("usr/local/bin") == "usr/local/bin"
4040
assert Path.relative("../usr/local/bin") == "../usr/local/bin"
41+
42+
assert Path.relative_to("D:/usr/local/foo", "D:/usr/") == "local/foo"
43+
assert Path.relative_to("D:/usr/local/foo", "d:/usr/") == "local/foo"
44+
assert Path.relative_to("d:/usr/local/foo", "D:/usr/") == "local/foo"
45+
assert Path.relative_to("D:/usr/local/foo", "d:") == "usr/local/foo"
46+
assert Path.relative_to("D:/usr/local/foo", "D:") == "usr/local/foo"
4147
end
4248

4349
test :type_win do

0 commit comments

Comments
 (0)