Skip to content

Commit cd43f61

Browse files
committed
CLI/Compile: added a test to showcase the new behaviour
1 parent 3687b0f commit cd43f61

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/elixir/test/elixir/kernel/cli_test.exs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,14 @@ defmodule Kernel.CLI.CompileTest do
9494
assert :string.str(output, bar) > 0, "expected bar.ex to miss module Foo"
9595
assert :string.str(output, 'elixir_compiler') == 0, "expected elixir_compiler to not be in output"
9696
end
97+
98+
test :compile_missing_patterns do
99+
fixture = fixture_path "compile_sample.ex"
100+
output = elixirc('#{fixture} non_existing.ex -o #{tmp_path}')
101+
assert :string.str(output, 'non_existing.ex') > 0, "expected non_existing.ex to be mentionned"
102+
assert :string.str(output, 'compile_sample.ex') == 0, "expected compile_sample.ex to not be mentionned"
103+
refute File.exists?(tmp_path("Elixir.CompileSample.beam")) , "expected the sample to not be compiled"
104+
end
97105
end
98106

99107
defmodule Kernel.CLI.ParallelCompilerTest do

0 commit comments

Comments
 (0)