Skip to content

Commit cd889d7

Browse files
committed
Explicit tests for windows-posix path translation
1 parent cf0dbcd commit cd889d7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spec/host_spec.rb

+13
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,17 @@ def with_tmpdir(path)
5858
end
5959
end
6060

61+
context "path mangling" do
62+
win_path = "D:\\a\\_temp\\d20221224-4508-11w7f4\\foo.yml"
63+
posix_pathname = Pathname.new("D:/a/_temp/d20221224-4508-11w7f4/foo.yml")
64+
65+
it "converts windows paths to pathnames" do
66+
expect(ArduinoCI::Host.pathname_to_windows(posix_pathname)).to eq(win_path)
67+
end
68+
69+
it "converts pathnames to windows paths" do
70+
expect(ArduinoCI::Host.windows_to_pathname(win_path)).to eq(posix_pathname)
71+
end
72+
end
73+
6174
end

0 commit comments

Comments
 (0)