diff options
author | Nobuyoshi Nakada <[email protected]> | 2023-09-08 02:16:15 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2023-09-27 21:53:01 +0900 |
commit | e1250a5f9778f463a541bc1ee5a951f64c131bbf (patch) | |
tree | bff420527442756e3cceec28b9463b2f59d47e21 /test/ruby/test_rubyoptions.rb | |
parent | 50520cc1930331bccdb94730e17ddc01798f2be0 (diff) |
Syntax check of block exits in the parser
Diffstat (limited to 'test/ruby/test_rubyoptions.rb')
-rw-r--r-- | test/ruby/test_rubyoptions.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 4cc0b707d4..2e2fdca76f 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -369,6 +369,9 @@ class TestRubyOptions < Test::Unit::TestCase def test_syntax_check assert_in_out_err(%w(-c -e a=1+1 -e !a), "", ["Syntax OK"], []) + assert_in_out_err(%w(-c -e break), "", [], ["-e:1: Invalid break", :*]) + assert_in_out_err(%w(-c -e next), "", [], ["-e:1: Invalid next", :*]) + assert_in_out_err(%w(-c -e redo), "", [], ["-e:1: Invalid redo", :*]) end def test_invalid_option |