diff options
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r-- | test/ruby/test_parse.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index 8f957bbc58..008dbbcd92 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -657,8 +657,11 @@ x = __ENCODING__ end def test_invalid_char + bug10117 = '[ruby-core:64243] [Bug #10117]' + invalid_char = /Invalid char `\\x01'/ x = 1 - assert_equal(1, eval("\x01x")) + assert_in_out_err(%W"-e \x01x", "", [], invalid_char, bug10117) + assert_syntax_error("\x01x", invalid_char, bug10117) assert_equal(nil, eval("\x04x")) end |