[PRISM] test_syntax_check assertion updates for prism

This commit is contained in:
Kevin Newton 2024-08-15 09:22:03 -04:00
Родитель 2d66ef717d
Коммит a402b18c4e
1 изменённых файлов: 10 добавлений и 10 удалений

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

@ -395,16 +395,16 @@ class TestRubyOptions < Test::Unit::TestCase
def test_syntax_check
assert_in_out_err(%w(-cw -e a=1+1 -e !a), "", ["Syntax OK"], [])
assert_in_out_err(%w(-cw -e break), "", [], ["-e:1: Invalid break", :*])
assert_in_out_err(%w(-cw -e next), "", [], ["-e:1: Invalid next", :*])
assert_in_out_err(%w(-cw -e redo), "", [], ["-e:1: Invalid redo", :*])
assert_in_out_err(%w(-cw -e retry), "", [], ["-e:1: Invalid retry", :*])
assert_in_out_err(%w(-cw -e yield), "", [], ["-e:1: Invalid yield", :*])
assert_in_out_err(%w(-cw -e begin -e break -e end), "", [], ["-e:2: Invalid break", :*])
assert_in_out_err(%w(-cw -e begin -e next -e end), "", [], ["-e:2: Invalid next", :*])
assert_in_out_err(%w(-cw -e begin -e redo -e end), "", [], ["-e:2: Invalid redo", :*])
assert_in_out_err(%w(-cw -e begin -e retry -e end), "", [], ["-e:2: Invalid retry", :*])
assert_in_out_err(%w(-cw -e begin -e yield -e end), "", [], ["-e:2: Invalid yield", :*])
assert_in_out_err(%w(-cw -e break), "", [], [:*, /(-e:1:|~) Invalid break/, :*])
assert_in_out_err(%w(-cw -e next), "", [], [:*, /(-e:1:|~) Invalid next/, :*])
assert_in_out_err(%w(-cw -e redo), "", [], [:*, /(-e:1:|~) Invalid redo/, :*])
assert_in_out_err(%w(-cw -e retry), "", [], [:*, /(-e:1:|~) Invalid retry/, :*])
assert_in_out_err(%w(-cw -e yield), "", [], [:*, /(-e:1:|~) Invalid yield/, :*])
assert_in_out_err(%w(-cw -e begin -e break -e end), "", [], [:*, /(-e:2:|~) Invalid break/, :*])
assert_in_out_err(%w(-cw -e begin -e next -e end), "", [], [:*, /(-e:2:|~) Invalid next/, :*])
assert_in_out_err(%w(-cw -e begin -e redo -e end), "", [], [:*, /(-e:2:|~) Invalid redo/, :*])
assert_in_out_err(%w(-cw -e begin -e retry -e end), "", [], [:*, /(-e:2:|~) Invalid retry/, :*])
assert_in_out_err(%w(-cw -e begin -e yield -e end), "", [], [:*, /(-e:2:|~) Invalid yield/, :*])
assert_in_out_err(%w(-cw -e !defined?(break)), "", ["Syntax OK"], [])
assert_in_out_err(%w(-cw -e !defined?(next)), "", ["Syntax OK"], [])
assert_in_out_err(%w(-cw -e !defined?(redo)), "", ["Syntax OK"], [])