[PRISM] Enhance syntax error message extraction in test_literal_suffix btest

This commit is contained in:
Kevin Newton 2024-04-03 15:42:38 -04:00
Родитель ced6aff206
Коммит 4ef99905a6
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -47,8 +47,8 @@ assert_equal '10000000000000000001/10000000000000000000',
'1.0000000000000000001r'
assert_equal 'unexpected local variable or method, expecting end-of-input',
%q{begin eval('1ir', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\^~*|\A:(?:\d+:)? syntax error(?! found)) (.*)/, 1] end}
%q{begin eval('1ir', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\^~*|\A:(?:\d+:)? syntax error,) (.*)/, 1]; end}
assert_equal 'unexpected local variable or method, expecting end-of-input',
%q{begin eval('1.2ir', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\^~*|\A:(?:\d+:)? syntax error(?! found)) (.*)/, 1] end}
%q{begin eval('1.2ir', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\^~*|\A:(?:\d+:)? syntax error,) (.*)/, 1]; end}
assert_equal 'unexpected local variable or method, expecting end-of-input',
%q{begin eval('1e1r', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\^~*|\A:(?:\d+:)? syntax error(?! found)) (.*)/, 1] end}
%q{begin eval('1e1r', nil, '', 0); rescue SyntaxError => e; e.message[/(?:\^~*|\A:(?:\d+:)? syntax error,) (.*)/, 1]; end}