Skip to content

Commit ed0b161

Browse files
committed
Add prompt test
1 parent 5e64033 commit ed0b161

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/iex/test/iex/interaction_test.exs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ defmodule IEx.InteractionTest do
55

66
### basic interaction ###
77

8+
test "whole output" do
9+
IEx.Options.set :colors, enabled: false
10+
11+
# We're using bare-bones capture_io instead of capture_iex only once here
12+
assert capture_io("IO.puts \"Hello world\"", fn ->
13+
IEx.Server.start(IEx.boot_config(dot_iex_path: ""))
14+
end) =~ %r"^Interactive Elixir \(.+?\) - press Ctrl\+C to exit \(type h\(\) ENTER for help\)\niex\(1\)> Hello world\n:ok\niex\(2\)> $"
15+
end
16+
817
test "empty input" do
918
assert capture_iex("\n") == "nil"
1019
end

0 commit comments

Comments
 (0)