aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_m17n.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index bb0a8a5010..8f763e029a 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -301,4 +301,12 @@ class TestM17N < Test::Unit::TestCase
}
}
end
+
+ def test_dynamic_euc_regexp
+ assert_encoding("EUC-JP", /#{}\xc0\xa1/e.encoding)
+ assert_raise(RegexpError) { eval('/\xa1#{}/e') }
+ assert_raise(RegexpError) { eval('/#{}\xa1/e') }
+ #assert_raise(SyntaxError) { eval('/\xa1#{}\xa1/e') }
+ #assert_raise(SyntaxError) { s = e('\xa1'); /#{s}#{s}/ }
+ end
end