Skip to content

Commit b8528f6

Browse files
author
José Valim
committed
Remove warnings from the test suite
1 parent c9fbbac commit b8528f6

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/mix/lib/mix/tasks/escript.build.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ defmodule Mix.Tasks.Escript.Build do
286286
quote do
287287
erl_version = :erlang.system_info(:otp_release)
288288
case :string.to_integer(erl_version) do
289-
{num, _} when is_integer(num) and num >= 17 -> nil
289+
{num, _} when num >= 17 -> nil
290290
_ ->
291291
io_error ["Incompatible Erlang/OTP release: ", erl_version,
292292
".\nThis escript requires at least Erlang/OTP 17.0.\n"]

lib/mix/test/test_helper.exs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ defmodule MixTest.Case do
8383
def in_fixture(which, tmp, function) do
8484
src = fixture_path(which)
8585
dest = tmp_path(tmp)
86+
flag = String.to_char_list(tmp_path)
8687

8788
File.rm_rf!(dest)
8889
File.mkdir_p!(dest)
@@ -95,7 +96,12 @@ defmodule MixTest.Case do
9596
File.cd! dest, function
9697
after
9798
:code.set_path(get_path)
98-
for {mod, :in_memory} <- :code.all_loaded -- previous, do: purge [mod]
99+
100+
for {mod, file} <- :code.all_loaded -- previous,
101+
file == :in_memory or
102+
(is_list(file) and :lists.prefix(flag, file)) do
103+
purge [mod]
104+
end
99105
end
100106
end
101107

0 commit comments

Comments
 (0)