community/elixir-1.11.2-r0: multiple test failures
Elixir has multiple test failures when building for Alpine Linux 3.14:
Test failures
1) test | outside of cons (Kernel.ErrorsTest) test/elixir/kernel/errors_test.exs:1233 Wrong message for CompileError expected: ~r/nofile:1: misplaced operator |\/2/ actual: "nofile:1: cannot define module Foo because it is currently being defined in test/elixir/module_test.exs:493" code: assert_eval_raise CompileError, stacktrace: test/elixir/kernel/errors_test.exs:1236: (test)
test function import conflict (Kernel.ErrorsTest) test/elixir/kernel/errors_test.exs:826 Wrong message for CompileError expected: "nofile:3: function exit/1 imported from both :erlang and Kernel, call is ambiguous" actual: "nofile:2: cannot import :erlang.alias/1 because it conflicts with Elixir special forms" code: assert_eval_raise CompileError, stacktrace: test/elixir/kernel/errors_test.exs:827: (test)
test failed remote call stacktrace includes file/line info (Kernel.ErrorsTest) test/elixir/kernel/errors_test.exs:1199 match (=) failed code: assert [{:erlang, :apply, [1, :foo, []], []}, {MODULE, :bad_remote_call, 1, [file: _, line: _]} | _] = STACKTRACE left: [{:erlang, :apply, [1, :foo, []], []}, {MODULE, :bad_remote_call, 1, [file: _, line: _]} | _] right: [ {:erlang, :apply, [1, :foo, []], [error_info: %{module: :erl_erts_errors}]}, {Kernel.ErrorsTest, :bad_remote_call, 1, [ file: 'test/elixir/kernel/errors_test.exs', line: 1241 ]}, {Kernel.ErrorsTest, :"test failed remote call stacktrace includes file/line info", 1, [ file: 'test/elixir/kernel/errors_test.exs', line: 1201 ]}, {ExUnit.Runner, :exec_test, 1, [file: 'lib/ex_unit/runner.ex', line: 391]}, {:timer, :tc, 1, [file: 'timer.erl', line: 166]}, {ExUnit.Runner, :"-spawn_test_monitor/4-fun-1-", 4, [file: 'lib/ex_unit/runner.ex', line: 342]} ] stacktrace: test/elixir/kernel/errors_test.exs:1204: (test)
test no effect operator (Kernel.WarningTest) test/elixir/kernel/warning_test.exs:919 Assertion with =~ failed code: assert capture_err(fn -> Code.eval_string("defmodule Sample do\n def a(x) do\n x != :foo\n :ok\n end\nend\n") end) =~ "use of operator != has no effect" left: "warning: use of operator '/=' has no effect\n nofile:3\n\n" right: "use of operator != has no effect" stacktrace: test/elixir/kernel/warning_test.exs:920: (test)
test defguard overriding defmacro (Kernel.WarningTest) test/elixir/kernel/warning_test.exs:1664 Assertion with =~ failed code: assert capture_err(fn -> Code.eval_string("defmodule Sample do\n defmacro foo(bar), do: bar == :bar\n defguard foo(baz) when baz == :baz\nend\n") end) =~ ~r"this clause( for foo/1)? cannot match because a previous clause at line 2 always matches" left: "warning: this clause for MACRO-foo/2 cannot match because a previous clause at line 2 always matches\n nofile:3\n\n" right: ~r/this clause( for foo/1)? cannot match because a previous clause at line 2 always matches/ stacktrace: test/elixir/kernel/warning_test.exs:1665: (test)
test eval failure warning (Kernel.WarningTest) test/elixir/kernel/warning_test.exs:934 Assertion with =~ failed code: assert capture_err(fn -> assert_raise(ArgumentError, fn -> Code.eval_string("defmodule Sample do\n Atom.to_string "abc"\nend\n") end) end) =~ ~r"this expression will fail with ArgumentError\n.*nofile:2" left: "" right: ~r/this expression will fail with ArgumentError\n.*nofile:2/ stacktrace: test/elixir/kernel/warning_test.exs:935: (test)
test defmacro overriding defguard (Kernel.WarningTest) test/elixir/kernel/warning_test.exs:1678 Assertion with =~ failed code: assert capture_err(fn -> Code.eval_string("defmodule Sample do\n defguard foo(baz) when baz == :baz\n defmacro foo(bar), do: bar == :bar\nend\n") end) =~ ~r"this clause( for foo/1)? cannot match because a previous clause at line 2 always matches" left: "warning: this clause for MACRO-foo/2 cannot match because a previous clause at line 2 always matches\n nofile:3\n\n" right: ~r/this clause( for foo/1)? cannot match because a previous clause at line 2 always matches/ stacktrace: test/elixir/kernel/warning_test.exs:1679: (test)
test unused guard (Kernel.WarningTest) test/elixir/kernel/warning_test.exs:625 Assertion with =~ failed code: assert capture_err(fn -> Code.eval_string("defmodule Sample do\n def atom_case do\n v = "bc"\n case v do\n _ when is_atom(v) -> :ok\n _ -> :fail\n end\n end\nend\n") end) =~ "this check/guard will always yield the same result" left: "warning: this clause cannot match because its guard evaluates to 'false'\n nofile:5\n\n" right: "this check/guard will always yield the same result" stacktrace: test/elixir/kernel/warning_test.exs:626: (test)
test in guard empty list (Kernel.WarningTest) test/elixir/kernel/warning_test.exs:907 Assertion with =~ failed code: assert capture_err(fn -> Code.eval_string("defmodule Sample do\n def a(x) when x in [], do: x\nend\n") end) =~ "this check/guard will always yield the same result" left: "warning: this clause cannot match because its guard evaluates to 'false'\n nofile:2\n\nwarning: no clause will ever match\n nofile:2\n\n" right: "this check/guard will always yield the same result" stacktrace: test/elixir/kernel/warning_test.exs:908: (test)
test with and do clauses emit errors, else clauses do not (Kernel.WarningTest) test/elixir/kernel/warning_test.exs:1150 Assertion with =~ failed code: assert capture_err(fn -> Code.compile_string("with {:first, int} when is_integer(int) <- {:second, Integer.gcd(2, 4)} do\n int\nend\n") end) =~ "this clause cannot match" left: "" right: "this clause cannot match" stacktrace: test/elixir/kernel/warning_test.exs:1151: (test)
See: https://build.alpinelinux.org/buildlogs/build-3-14-s390x/community/elixir/elixir-1.11.2-r0.log