Fix tests on Windows

This commit is contained in:
Jonatan Kłosko 2023-03-06 21:37:27 +01:00
parent b9237dd7f0
commit 5fd17ca958

View file

@ -427,19 +427,19 @@ defmodule Livebook.FileSystem.FileTest do
test "adds extension to the name" do
file = FileSystem.File.local(p("/file"))
assert %{path: "/file.txt"} = FileSystem.File.ensure_extension(file, ".txt")
assert %{path: p("/file.txt")} = FileSystem.File.ensure_extension(file, ".txt")
end
test "keeps the name unchanged if it already has the given extension" do
file = FileSystem.File.local(p("/file.txt"))
assert %{path: "/file.txt"} = FileSystem.File.ensure_extension(file, ".txt")
assert %{path: p("/file.txt")} = FileSystem.File.ensure_extension(file, ".txt")
end
test "given a directory changes path to empty file name with the given extension" do
dir = FileSystem.File.local(p("/dir/"))
assert %{path: "/dir/.txt"} = FileSystem.File.ensure_extension(dir, ".txt")
assert %{path: p("/dir/.txt")} = FileSystem.File.ensure_extension(dir, ".txt")
end
end
end