diff options
Diffstat (limited to 'lib/mix/test/mix/tasks/format_test.exs')
-rw-r--r-- | lib/mix/test/mix/tasks/format_test.exs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/mix/test/mix/tasks/format_test.exs b/lib/mix/test/mix/tasks/format_test.exs index 6e63246e3..cf6f6b544 100644 --- a/lib/mix/test/mix/tasks/format_test.exs +++ b/lib/mix/test/mix/tasks/format_test.exs @@ -175,6 +175,12 @@ defmodule Mix.Tasks.FormatTest do assert_received {:mix_shell, :info, ["The following files are not formatted" <> _]} end + test "raises an error if --no-exit is passed without --check-formatted" do + assert_raise Mix.Error, ~r"--no-exit can only be used together", fn -> + Mix.Tasks.Format.run(["--no-exit", "-"]) + end + end + test "uses inputs and configuration from .formatter.exs", context do in_tmp(context.test, fn -> File.write!(".formatter.exs", """ |