Skip to content

Commit 23934b4

Browse files
committed
Fix failure on Erlang/OTP master
1 parent c370a8a commit 23934b4

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

lib/elixir/test/elixir/kernel/warning_test.exs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -933,24 +933,22 @@ defmodule Kernel.WarningTest do
933933

934934
test "eval failure warning" do
935935
assert capture_err(fn ->
936-
assert_raise ArgumentError, fn ->
937-
Code.eval_string("""
938-
defmodule Sample do
939-
Atom.to_string "abc"
940-
end
941-
""")
936+
Code.eval_string("""
937+
defmodule Sample1 do
938+
def foo, do: Atom.to_string "abc"
942939
end
940+
""")
943941
end) =~ ~r"this expression will fail with ArgumentError\n.*nofile:2"
944942

945943
assert capture_err(fn ->
946944
Code.eval_string("""
947-
defmodule Sample do
945+
defmodule Sample2 do
948946
def foo, do: 1 + nil
949947
end
950948
""")
951949
end) =~ ~r"this expression will fail with ArithmeticError\n.*nofile:2"
952950
after
953-
purge([Sample])
951+
purge([Sample1, Sample2])
954952
end
955953

956954
test "undefined function for behaviour" do

0 commit comments

Comments
 (0)