Skip to content

Commit e9e883d

Browse files
committed
Fix --no-compile test case
1 parent 9727478 commit e9e883d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

test/mix/tasks/gradient_test.exs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ defmodule Mix.Tasks.GradientTest do
99
@s_wrong_ret_beam "Elixir.SWrongRet.beam"
1010
@s_wrong_ret_ex "s_wrong_ret.ex"
1111

12+
#@tag :skip
1213
test "--no-compile option" do
13-
build_dir = Path.join(@type_path, "_build")
14-
run_task(@type_path, [@s_wrong_ret_beam])
15-
assert was_dir?(build_dir)
14+
info = "Compiling project..."
1615

17-
run_task(@type_path, ["--no-compile", "--", @s_wrong_ret_beam])
18-
assert not was_dir?(build_dir)
16+
output = run_task(@type_path, [@s_wrong_ret_beam])
17+
assert String.contains?(output, info)
18+
19+
dir = Path.join(@type_path, "_build")
20+
:os.cmd(String.to_charlist("rm -Rf " <> dir))
21+
22+
output = run_task(@type_path, ["--no-compile", "--", @s_wrong_ret_beam])
23+
assert not String.contains?(output, info)
1924
end
2025

2126
test "path to the beam file" do

0 commit comments

Comments
 (0)