From cd8b28f0e7661498bbae259982809fc7f50e0581 Mon Sep 17 00:00:00 2001 From: Kevin Newton Date: Wed, 15 May 2024 11:40:52 -0400 Subject: [PATCH] [PRISM] Enable test_location_of_invalid_token --- test/.excludes-prism/TestParse.rb | 2 -- test/ruby/test_parse.rb | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/test/.excludes-prism/TestParse.rb b/test/.excludes-prism/TestParse.rb index 3b390dbedd..1c2349cfe5 100644 --- a/test/.excludes-prism/TestParse.rb +++ b/test/.excludes-prism/TestParse.rb @@ -1,9 +1,7 @@ exclude(:test_global_variable, "error message format") exclude(:test_invalid_char, "error message format") -exclude(:test_location_of_invalid_token, "error message format") exclude(:test_percent, "error message format") exclude(:test_question, "error message format") exclude(:test_string, "error message format") exclude(:test_truncated_source_line, "truncate error message") -exclude(:test_unexpected_eof, "error message format") exclude(:test_void_value_in_rhs, "missing raising error for some void value expressions") diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index c77cdc5673..0035f77957 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -1394,7 +1394,7 @@ x = __ENCODING__ end def test_location_of_invalid_token - assert_syntax_error('class xxx end', /^ \^~~\Z/) + assert_syntax_error('class xxx end', /(^|\| ) \^~~(?!~)/) end def test_whitespace_warning