summaryrefslogtreecommitdiff
path: root/lib/iex/test/iex/helpers_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/iex/test/iex/helpers_test.exs')
-rw-r--r--lib/iex/test/iex/helpers_test.exs44
1 files changed, 26 insertions, 18 deletions
diff --git a/lib/iex/test/iex/helpers_test.exs b/lib/iex/test/iex/helpers_test.exs
index ff6d014bb..85d579f0f 100644
--- a/lib/iex/test/iex/helpers_test.exs
+++ b/lib/iex/test/iex/helpers_test.exs
@@ -195,30 +195,38 @@ defmodule IEx.HelpersTest do
~r/#{@elixir_erl}:\d+$/
end
- test "opens OTP lists module" do
- assert capture_iex("open(:lists)") |> maybe_trim_quotes() =~ ~r/#{@lists_erl}:\d+$/
- end
+ # Some installations remove the source file once Erlang is compiled. See #7348.
+ if File.regular?(@lists_erl) do
+ test "opens OTP lists module" do
+ assert capture_iex("open(:lists)") |> maybe_trim_quotes() =~ ~r/#{@lists_erl}:\d+$/
+ end
- test "opens OTP lists module.function" do
- assert capture_iex("open(:lists.reverse)") |> maybe_trim_quotes() =~ ~r/#{@lists_erl}:\d+$/
- end
+ test "opens OTP lists module.function" do
+ assert capture_iex("open(:lists.reverse)") |> maybe_trim_quotes() =~
+ ~r/#{@lists_erl}:\d+$/
+ end
- test "opens OTP lists module.function/arity" do
- assert capture_iex("open(:lists.reverse/1)") |> maybe_trim_quotes() =~
- ~r/#{@lists_erl}:\d+$/
+ test "opens OTP lists module.function/arity" do
+ assert capture_iex("open(:lists.reverse/1)") |> maybe_trim_quotes() =~
+ ~r/#{@lists_erl}:\d+$/
+ end
end
- test "opens OTP httpc module" do
- assert capture_iex("open(:httpc)") |> maybe_trim_quotes() =~ ~r/#{@httpc_erl}:\d+$/
- end
+ # Some installations remove the source file once Erlang is compiled. See #7348.
+ if File.regular?(@httpc_erl) do
+ test "opens OTP httpc module" do
+ assert capture_iex("open(:httpc)") |> maybe_trim_quotes() =~ ~r/#{@httpc_erl}:\d+$/
+ end
- test "opens OTP httpc module.function" do
- assert capture_iex("open(:httpc.request)") |> maybe_trim_quotes() =~ ~r/#{@httpc_erl}:\d+$/
- end
+ test "opens OTP httpc module.function" do
+ assert capture_iex("open(:httpc.request)") |> maybe_trim_quotes() =~
+ ~r/#{@httpc_erl}:\d+$/
+ end
- test "opens OTP httpc module.function/arity" do
- assert capture_iex("open(:httpc.request/1)") |> maybe_trim_quotes() =~
- ~r/#{@httpc_erl}:\d+$/
+ test "opens OTP httpc module.function/arity" do
+ assert capture_iex("open(:httpc.request/1)") |> maybe_trim_quotes() =~
+ ~r/#{@httpc_erl}:\d+$/
+ end
end
test "errors OTP preloaded module" do