diff --git a/interp/interp_consistent_test.go b/interp/interp_consistent_test.go index b4d90a42b..ab46d3e77 100644 --- a/interp/interp_consistent_test.go +++ b/interp/interp_consistent_test.go @@ -6,6 +6,7 @@ import ( "os" "os/exec" "path/filepath" + "runtime" "strings" "testing" @@ -180,6 +181,12 @@ func TestInterpConsistencyBuild(t *testing.T) { } func TestInterpErrorConsistency(t *testing.T) { + if runtime.Version() >= "go1.18" { + // Error messages have changed a lot between go1.17 and go1.18. + // Skip testing on go1.18 and beyond while we support go1.17. + // It can be re-enabled after dropping go1.17. + t.Skip("skip go1.18+") + } testCases := []struct { fileName string expectedInterp string