@@ -195,30 +195,38 @@ defmodule IEx.HelpersTest do
195
195
~r/ #{ @ elixir_erl } :\d +$/
196
196
end
197
197
198
- test "opens OTP lists module" do
199
- assert capture_iex ( "open(:lists)" ) |> maybe_trim_quotes ( ) =~ ~r/ #{ @ lists_erl } :\d +$/
200
- end
198
+ # Some installations remove the source file once Erlang is compiled. See #7348.
199
+ if File . regular? ( @ lists_erl ) do
200
+ test "opens OTP lists module" do
201
+ assert capture_iex ( "open(:lists)" ) |> maybe_trim_quotes ( ) =~ ~r/ #{ @ lists_erl } :\d +$/
202
+ end
201
203
202
- test "opens OTP lists module.function" do
203
- assert capture_iex ( "open(:lists.reverse)" ) |> maybe_trim_quotes ( ) =~ ~r/ #{ @ lists_erl } :\d +$/
204
- end
204
+ test "opens OTP lists module.function" do
205
+ assert capture_iex ( "open(:lists.reverse)" ) |> maybe_trim_quotes ( ) =~
206
+ ~r/ #{ @ lists_erl } :\d +$/
207
+ end
205
208
206
- test "opens OTP lists module.function/arity" do
207
- assert capture_iex ( "open(:lists.reverse/1)" ) |> maybe_trim_quotes ( ) =~
208
- ~r/ #{ @ lists_erl } :\d +$/
209
+ test "opens OTP lists module.function/arity" do
210
+ assert capture_iex ( "open(:lists.reverse/1)" ) |> maybe_trim_quotes ( ) =~
211
+ ~r/ #{ @ lists_erl } :\d +$/
212
+ end
209
213
end
210
214
211
- test "opens OTP httpc module" do
212
- assert capture_iex ( "open(:httpc)" ) |> maybe_trim_quotes ( ) =~ ~r/ #{ @ httpc_erl } :\d +$/
213
- end
215
+ # Some installations remove the source file once Erlang is compiled. See #7348.
216
+ if File . regular? ( @ httpc_erl ) do
217
+ test "opens OTP httpc module" do
218
+ assert capture_iex ( "open(:httpc)" ) |> maybe_trim_quotes ( ) =~ ~r/ #{ @ httpc_erl } :\d +$/
219
+ end
214
220
215
- test "opens OTP httpc module.function" do
216
- assert capture_iex ( "open(:httpc.request)" ) |> maybe_trim_quotes ( ) =~ ~r/ #{ @ httpc_erl } :\d +$/
217
- end
221
+ test "opens OTP httpc module.function" do
222
+ assert capture_iex ( "open(:httpc.request)" ) |> maybe_trim_quotes ( ) =~
223
+ ~r/ #{ @ httpc_erl } :\d +$/
224
+ end
218
225
219
- test "opens OTP httpc module.function/arity" do
220
- assert capture_iex ( "open(:httpc.request/1)" ) |> maybe_trim_quotes ( ) =~
221
- ~r/ #{ @ httpc_erl } :\d +$/
226
+ test "opens OTP httpc module.function/arity" do
227
+ assert capture_iex ( "open(:httpc.request/1)" ) |> maybe_trim_quotes ( ) =~
228
+ ~r/ #{ @ httpc_erl } :\d +$/
229
+ end
222
230
end
223
231
224
232
test "errors OTP preloaded module" do
0 commit comments