Blame elixir-1.6.5-disable_tests_on_erlang_sources_if_unavailable.patch

Timothée Floure d5df53
--- lib/iex/test/iex/helpers_test.exs.orig	2018-05-07 12:36:01.000000000 +0200
Timothée Floure d5df53
+++ lib/iex/test/iex/helpers_test.exs	2018-06-07 10:20:27.196176134 +0200
Timothée Floure d5df53
@@ -195,30 +195,38 @@
Timothée Floure d5df53
                ~r/#{@elixir_erl}:\d+$/
Timothée Floure d5df53
     end
Timothée Floure d5df53
 
Timothée Floure d5df53
-    test "opens OTP lists module" do
Timothée Floure d5df53
-      assert capture_iex("open(:lists)") |> maybe_trim_quotes() =~ ~r/#{@lists_erl}:\d+$/
Timothée Floure d5df53
-    end
Timothée Floure d5df53
-
Timothée Floure d5df53
-    test "opens OTP lists module.function" do
Timothée Floure d5df53
-      assert capture_iex("open(:lists.reverse)") |> maybe_trim_quotes() =~ ~r/#{@lists_erl}:\d+$/
Timothée Floure d5df53
-    end
Timothée Floure d5df53
-
Timothée Floure d5df53
-    test "opens OTP lists module.function/arity" do
Timothée Floure d5df53
-      assert capture_iex("open(:lists.reverse/1)") |> maybe_trim_quotes() =~
Timothée Floure d5df53
-               ~r/#{@lists_erl}:\d+$/
Timothée Floure d5df53
-    end
Timothée Floure d5df53
-
Timothée Floure d5df53
-    test "opens OTP httpc module" do
Timothée Floure d5df53
-      assert capture_iex("open(:httpc)") |> maybe_trim_quotes() =~ ~r/#{@httpc_erl}:\d+$/
Timothée Floure d5df53
-    end
Timothée Floure d5df53
-
Timothée Floure d5df53
-    test "opens OTP httpc module.function" do
Timothée Floure d5df53
-      assert capture_iex("open(:httpc.request)") |> maybe_trim_quotes() =~ ~r/#{@httpc_erl}:\d+$/
Timothée Floure d5df53
-    end
Timothée Floure d5df53
-
Timothée Floure d5df53
-    test "opens OTP httpc module.function/arity" do
Timothée Floure d5df53
-      assert capture_iex("open(:httpc.request/1)") |> maybe_trim_quotes() =~
Timothée Floure d5df53
-               ~r/#{@httpc_erl}:\d+$/
Timothée Floure d5df53
+    # Some installations remove the source file once Erlang is compiled. See #7348.
Timothée Floure d5df53
+    if File.regular?(@lists_erl) do
Timothée Floure d5df53
+      test "opens OTP lists module" do
Timothée Floure d5df53
+        assert capture_iex("open(:lists)") |> maybe_trim_quotes() =~ ~r/#{@lists_erl}:\d+$/
Timothée Floure d5df53
+      end
Timothée Floure d5df53
+
Timothée Floure d5df53
+      test "opens OTP lists module.function" do
Timothée Floure d5df53
+        assert capture_iex("open(:lists.reverse)") |> maybe_trim_quotes() =~
Timothée Floure d5df53
+                 ~r/#{@lists_erl}:\d+$/
Timothée Floure d5df53
+      end
Timothée Floure d5df53
+
Timothée Floure d5df53
+      test "opens OTP lists module.function/arity" do
Timothée Floure d5df53
+        assert capture_iex("open(:lists.reverse/1)") |> maybe_trim_quotes() =~
Timothée Floure d5df53
+                 ~r/#{@lists_erl}:\d+$/
Timothée Floure d5df53
+      end
Timothée Floure d5df53
+    end
Timothée Floure d5df53
+
Timothée Floure d5df53
+    # Some installations remove the source file once Erlang is compiled. See #7348.
Timothée Floure d5df53
+    if File.regular?(@httpc_erl) do
Timothée Floure d5df53
+      test "opens OTP httpc module" do
Timothée Floure d5df53
+        assert capture_iex("open(:httpc)") |> maybe_trim_quotes() =~ ~r/#{@httpc_erl}:\d+$/
Timothée Floure d5df53
+      end
Timothée Floure d5df53
+
Timothée Floure d5df53
+      test "opens OTP httpc module.function" do
Timothée Floure d5df53
+        assert capture_iex("open(:httpc.request)") |> maybe_trim_quotes() =~
Timothée Floure d5df53
+                 ~r/#{@httpc_erl}:\d+$/
Timothée Floure d5df53
+      end
Timothée Floure d5df53
+
Timothée Floure d5df53
+      test "opens OTP httpc module.function/arity" do
Timothée Floure d5df53
+        assert capture_iex("open(:httpc.request/1)") |> maybe_trim_quotes() =~
Timothée Floure d5df53
+                 ~r/#{@httpc_erl}:\d+$/
Timothée Floure d5df53
+      end
Timothée Floure d5df53
     end
Timothée Floure d5df53
 
Timothée Floure d5df53
     test "errors OTP preloaded module" do