diff options
author | Nobuyoshi Nakada <[email protected]> | 2019-05-24 16:10:59 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2019-05-24 16:12:17 +0900 |
commit | 2893550452f6f3cadb17c670da185813d7d0a835 (patch) | |
tree | a19bc3bd37f155cb2155fc1311f85fa851f77b55 /test/ruby/test_parse.rb | |
parent | 45ad375acccca2bb0852613b1e809a7af556f5e6 (diff) |
Mixed encoding error can continue to parse
Diffstat (limited to 'test/ruby/test_parse.rb')
-rw-r--r-- | test/ruby/test_parse.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_parse.rb b/test/ruby/test_parse.rb index dc4c143241..c59454f8f7 100644 --- a/test/ruby/test_parse.rb +++ b/test/ruby/test_parse.rb @@ -562,6 +562,9 @@ class TestParse < Test::Unit::TestCase assert_raise(SyntaxError) { eval(" ?a\x8a".force_encoding("utf-8")) } assert_equal("\u{1234}", eval("?\u{1234}")) assert_equal("\u{1234}", eval('?\u{1234}')) + assert_equal("\u{1234}", eval('?\u1234')) + e = assert_syntax_error('"#{?\u123}"', 'invalid Unicode escape') + assert_not_match(/end-of-input/, e.message) end def test_percent |