From 5c33a4c2a599cba6c0a4055d6e7b015dbbba4ffc Mon Sep 17 00:00:00 2001 From: Neal Gafter Date: Fri, 15 Dec 2023 16:51:45 -0800 Subject: [PATCH] Adjust tests to reflect changes in Julia 1.11 nightlies. --- test/rematch.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/rematch.jl b/test/rematch.jl index 1a2e182..5b4b9b9 100644 --- a/test/rematch.jl +++ b/test/rematch.jl @@ -76,7 +76,8 @@ file = Symbol(@__FILE__) @test ex isa LoadError e = ex.error @test e isa ErrorException - @test e.msg == "$file:$line: Could not bind `Unknown` as a type (due to `UndefVarError(:Unknown)`)." + err = (VERSION < v"1.11-") ? UndefVarError(:Unknown) : UndefVarError(:Unknown, @__MODULE__) + @test e.msg == "$file:$line: Could not bind `Unknown` as a type (due to `$err`)." end end end @@ -454,7 +455,8 @@ end end # nested guards can't use later bindings - @test_throws UndefVarError(:y) @match [2,1] begin + err = (VERSION < v"1.11-") ? UndefVarError(:y) : UndefVarError(:y, @__MODULE__) + @test_throws err @match [2,1] begin [x where y > x, y ] => (x,y) end end