diff options
author | José Valim <jose.valim@dashbit.co> | 2023-03-24 23:38:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-24 23:38:58 +0100 |
commit | 2df03b7b7941b1c7bfdda9f663b29e99371d81db (patch) | |
tree | a73e214f672fbc249e1a2f3db1715ccfcc7d6985 | |
parent | 6df2db5b0071762a3a0e871700c13f03fd824d4b (diff) | |
download | elixir-2df03b7b7941b1c7bfdda9f663b29e99371d81db.tar.gz |
Ensure app is enabled before pruned (#12495)
-rw-r--r-- | lib/mix/test/mix/tasks/compile_test.exs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/mix/test/mix/tasks/compile_test.exs b/lib/mix/test/mix/tasks/compile_test.exs index 746b29c11..5c3a1b5ea 100644 --- a/lib/mix/test/mix/tasks/compile_test.exs +++ b/lib/mix/test/mix/tasks/compile_test.exs @@ -330,16 +330,20 @@ defmodule Mix.Tasks.CompileTest do end test "code path prunning" do + Mix.ensure_application!(:parsetools) + in_fixture("no_mixfile", fn -> assert Mix.Task.run("compile", []) == {:ok, []} - assert :code.which(:edoc) == :non_existing + assert :code.where_is_file(~c"parsetools.app") == :non_existing end) end test "code path prunning disabled" do + Mix.ensure_application!(:parsetools) + in_fixture("no_mixfile", fn -> assert Mix.Task.run("compile", ["--no-prune-code-paths"]) == {:ok, []} - assert is_list(:code.which(:edoc)) + assert is_list(:code.where_is_file(~c"parsetools.app")) end) end end |