diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2017-05-24 17:12:41 +0200 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2017-05-24 17:12:41 +0200 |
commit | 6546156947e1dd4e9699e02d0ade64ef52bd33f1 (patch) | |
tree | 568dd62eea908e03d756c96225f05d4025ac3410 | |
parent | 4a5ce94a39219e8feef248fd449f00f8dc3abd23 (diff) | |
download | elixir-6546156947e1dd4e9699e02d0ade64ef52bd33f1.tar.gz |
More build fixes on Windows
-rw-r--r-- | .appveyor.yml | 2 | ||||
-rw-r--r-- | lib/elixir/test/elixir/file_test.exs | 47 |
2 files changed, 25 insertions, 24 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index ecca57977..7f3dbcbb8 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -2,6 +2,6 @@ version: 1-{branch}+{build} build_script: - cmd: C:\MinGW\msys\1.0\bin\make - - cmd: dir /s /q .git + - cmd: rmdir /s /q .git test_script: - cmd: C:\MinGW\msys\1.0\bin\make test
\ No newline at end of file diff --git a/lib/elixir/test/elixir/file_test.exs b/lib/elixir/test/elixir/file_test.exs index 4e4b604f1..e30fe28d2 100644 --- a/lib/elixir/test/elixir/file_test.exs +++ b/lib/elixir/test/elixir/file_test.exs @@ -1263,18 +1263,6 @@ defmodule FileTest do end end - - test "read_link with symlink" do - target = tmp_path("does_not_need_to_exist") - dest = tmp_path("symlink") - File.ln_s(target, dest) - try do - assert File.read_link(dest) == {:ok, target} - after - File.rm(dest) - end - end - test "read_link with regular file" do dest = tmp_path("symlink") File.touch(dest) @@ -1290,22 +1278,35 @@ defmodule FileTest do assert File.read_link(dest) == {:error, :enoent} end - test "read_link! with symlink" do - target = tmp_path("does_not_need_to_exist") - dest = tmp_path("symlink") - File.ln_s(target, dest) - try do - assert File.read_link!(dest) == target - after - File.rm(dest) - end - end - test "read_link! with nonexistent file" do dest = tmp_path("does_not_exist") assert_raise File.Error, fn -> File.read_link!(dest) end end + unless windows?() do + test "read_link with symlink" do + target = tmp_path("does_not_need_to_exist") + dest = tmp_path("symlink") + File.ln_s(target, dest) + try do + assert File.read_link(dest) == {:ok, target} + after + File.rm(dest) + end + end + + test "read_link! with symlink" do + target = tmp_path("does_not_need_to_exist") + dest = tmp_path("symlink") + File.ln_s(target, dest) + try do + assert File.read_link!(dest) == target + after + File.rm(dest) + end + end + end + test "IO stream UTF-8" do src = File.open! fixture_path("file.txt"), [:utf8] dest = tmp_path("tmp_test.txt") |