Skip to content

Commit 3aef019

Browse files
committed
Check for exclamation marks on Windows
1 parent fcacbfa commit 3aef019

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,14 @@ defmodule Kernel.CLITest do
6161
end)
6262
end
6363

64+
@tag :tmp_dir
65+
test "file smoke test", context do
66+
file = Path.join(context.tmp_dir, "hello_world!.exs")
67+
File.write!(file, "IO.puts :hello_world123")
68+
{output, 0} = System.cmd(elixir_executable(), [file])
69+
assert output =~ "hello_world123"
70+
end
71+
6472
test "--eval smoke test" do
6573
{output, 0} = System.cmd(elixir_executable(), ["--eval", "IO.puts :hello_world123"])
6674
assert output =~ "hello_world123"
@@ -70,8 +78,8 @@ defmodule Kernel.CLITest do
7078

7179
assert output =~ "hello_world123"
7280

73-
{output, 0} = System.cmd(elixir_executable(), ["-e", "IO.puts :hello_world123"])
74-
assert output =~ "hello_world123"
81+
# Check for exclamation mark handling on Windows
82+
assert {_output, 0} = System.cmd(elixir_executable(), ["-e", "URI.new!(~s||)"])
7583

7684
{output, 0} = System.cmd(iex_executable(), ["-e", "IO.puts :hello_world123; System.halt()"])
7785
assert output =~ "hello_world123"

0 commit comments

Comments
 (0)