Skip to content

Commit

Permalink
added tests for setting a local plt path
Browse files Browse the repository at this point in the history
  • Loading branch information
baseballlover723 committed Dec 23, 2020
1 parent 96a3a89 commit 622fad9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/dialyxir/project_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ defmodule Dialyxir.ProjectTest do

test "Default Project PLT File in _build dir" do
in_project(:default_apps, fn ->
assert Regex.match?(~r/_build.*plt/, Project.plt_file())
assert Regex.match?(~r/_build\/.*plt/, Project.plt_file())
end)
end

test "Can specify a different local PLT path" do
in_project(:alt_local_path, fn ->
assert Regex.match?(~r/dialyzer\/.*plt/, Project.plt_file())
end)
end

Expand Down
7 changes: 7 additions & 0 deletions test/fixtures/alt_local_path/mix.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
defmodule AltLocalPath.Mixfile do
use Mix.Project

def project do
[app: :alt_local_path, version: "1.0.0", dialyzer: [plt_local_path: "dialyzer"]]
end
end

0 comments on commit 622fad9

Please sign in to comment.