mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-02-25 07:16:45 +08:00
Fix tests on Windows
This commit is contained in:
parent
b9237dd7f0
commit
5fd17ca958
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue