elixir-lang / elixir

Elixir is a dynamic, functional language for building scalable and maintainable applications
https://elixir-lang.org/
Apache License 2.0
24.55k stars 3.38k forks source link

Match failed in Kernel.QuoteTest.ErrorsTest #6352

Closed enilsen16 closed 7 years ago

enilsen16 commented 7 years ago

Environment

Elixir 1.6.0-dev (8f858031b)

* Operating system: macOS 10.12.5

### Current behavior

1) test inside function error (Kernel.QuoteTest.ErrorsTest) test/elixir/kernel/quote_test.exs:216 match (=) failed The following variables were pinned: mod = Kernel.QuoteTest.ErrorsTest file = 'test/elixir/kernel/quotetest.exs' code: assert [{^mod, :add, 2, [file: ^file, line: 200]} | ] = System.stacktrace() right: [{:erlang, :+, [:a, :b], []}, {Kernel.QuoteTest.ErrorsTest, :add, 2, [file: 'test/elixir/kernel/quote_test.exs', line: 200]}, {ExUnit.Assertions, :assert_raise, 2, [file: 'lib/ex_unit/assertions.ex', line: 573]}, {Kernel.QuoteTest.ErrorsTest, :"test inside function error", 1, [file: 'test/elixir/kernel/quote_test.exs', line: 217]}, {ExUnit.Runner, :exec_test, 1, [file: 'lib/ex_unit/runner.ex', line: 292]}, {:timer, :tc, 1, [file: 'timer.erl', line: 166]}, {ExUnit.Runner, :"-spawn_test/3-fun-1-", 3, [file: 'lib/ex_unit/runner.ex', line: 240]}] stacktrace: test/elixir/kernel/quote_test.exs:223: (test)


### Expected behavior
I was able to get the tests passing by changing line 223 to

assert [, {^mod, :add, 2, [file: ^file, line: 200]} | ] = System.stacktrace


Though this causes Elixir with other versions of OTP to fail...
josevalim commented 7 years ago

This has been fixed in master but note that we do not guarantee a passing suite for unreleased OTP versions. :) In any case, thanks for the report!