@@ -6,15 +6,15 @@ defmodule Mix.CLITest do
66 test "env" do
77 in_fixture "custom_mixfile" , fn ->
88 env = System . cmd % b ( MIX_ENV =prod #{elixir_executable} #{mix_executable} run "IO.puts Mix.env")
9- assert env =~ % r "prod"
9+ assert env =~ "prod"
1010 end
1111 end
1212
1313 test "default task" do
1414 in_fixture "custom_mixfile" , fn ->
1515 output = mix ""
1616 assert File . regular? ( "ebin/Elixir.A.beam" )
17- assert output =~ % r "Compiled lib/a.ex"
17+ assert output =~ "Compiled lib/a.ex"
1818 end
1919 end
2020
@@ -32,86 +32,86 @@ defmodule Mix.CLITest do
3232 assert File . regular? ( "ebin/Elixir.B.beam" )
3333 assert File . regular? ( "ebin/Elixir.C.beam" )
3434
35- assert output =~ % r "Compiled lib/a\ . ex"
35+ assert output =~ "Compiled lib/a.ex"
3636 end
3737 end
3838
3939 test "test smoke test" do
4040 in_fixture "custom_mixfile" , fn ->
4141 output = mix "test"
4242 assert File . regular? ( "ebin/Elixir.A.beam" )
43- assert output =~ % r "1 tests, 0 failures"
43+ assert output =~ "1 tests, 0 failures"
4444
4545 output = mix "test test/hidden.ex --cover cover"
46- assert output =~ % r "1 tests, 1 failures"
47- assert output =~ % r "Generating cover results ... ok"
46+ assert output =~ "1 tests, 1 failures"
47+ assert output =~ "Generating cover results ... ok"
4848 assert File . regular? ( "cover/Elixir.A.html" )
4949 end
5050 end
5151
5252 test "help smoke test" do
5353 in_fixture "only_mixfile" , fn ->
5454 output = mix "help"
55- assert output =~ % r " mix compile\s +# Compile source files"
56- assert output =~ % r " mix hello\s +# Hello"
57- refute output =~ % r "mix invalid"
55+ assert output =~ % r / mix compile \s+# Compile source files/
56+ assert output =~ % r / mix hello \s+ # Hello/
57+ refute output =~ "mix invalid"
5858 end
5959 end
6060
6161 test "--help smoke test" do
6262 in_fixture "only_mixfile" , fn ->
6363 output = mix "--help"
64- assert output =~ %r" mix compile\s+# Compile source files"
65- refute output =~ % r "mix invalid"
64+ assert output =~ % r / mix compile \s+ # Compile source files/
65+ refute output =~ "mix invalid"
6666 end
6767 end
6868
6969 test "--version smoke test" do
7070 in_fixture "only_mixfile" , fn ->
7171 output = mix "--version"
72- assert output =~ %r" Elixir [ 0 - 9 \. a - z ] +"
73- refute output =~ %r " Something silly "
72+ assert output =~ % r / Elixir [ 0 - 9 \. a - z ] +/
73+ refute output =~ "Something silly"
7474 end
7575 end
7676
7777 test "help TASK smoke test" do
7878 in_fixture "only_mixfile" , fn ->
7979 output = mix "help compile"
80- assert output =~ %r "# mix help compile"
81- assert output =~ % r "## Command line options"
82- assert output =~ % r " ^Location:" m
80+ assert output =~ "# mix help compile"
81+ assert output =~ "## Command line options"
82+ assert output =~ % r / ^Location :/ m
8383 end
8484 end
8585
8686 test "do smoke test" do
8787 in_fixture "only_mixfile" , fn ->
8888 output = mix "do compile --list, help compile"
89- assert output =~ % r "# mix help compile"
90- assert output =~ % r "mix compile.elixir #"
89+ assert output =~ "# mix help compile"
90+ assert output =~ "mix compile.elixir #"
9191 end
9292 end
9393
9494 test "new with tests smoke test" do
9595 in_tmp "new_with_tests" , fn ->
9696 output = mix "new ."
97- assert output =~ % r ( \ * creating lib / new_with_tests . ex )
97+ assert output =~ " * creating lib/new_with_tests.ex"
9898
9999 output = mix "test"
100100 assert File . regular? ( "ebin/Elixir.NewWithTests.beam" )
101- assert output =~ % r "1 tests, 0 failures"
101+ assert output =~ "1 tests, 0 failures"
102102 end
103103 end
104104
105105 test "new --sup with tests smoke test" do
106106 in_tmp "new_with_tests" , fn ->
107107 output = mix "new . --sup"
108- assert output =~ %r( \ * creating lib/new_with_tests.ex)
109- assert output =~ %r( \ * creating lib/new_with_tests/supervisor.ex)
108+ assert output =~ " * creating lib/new_with_tests.ex"
109+ assert output =~ " * creating lib/new_with_tests/supervisor.ex"
110110
111111 output = mix "test"
112112 assert File . regular? ( "ebin/Elixir.NewWithTests.beam" )
113- assert output =~ % r "1 tests, 0 failures"
113+ assert output =~ "1 tests, 0 failures"
114114 end
115115 end
116116
117- end
117+ end
0 commit comments