diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-08 04:27:37 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-02-08 04:27:37 +0000 |
commit | 289ce68af0db09b8938972e91de13a384c3538a1 (patch) | |
tree | c9cd7a4776d8184716b019acb352fb4db35c4143 /test/ruby/test_m17n.rb | |
parent | 2293912b7b10713507c28263556ef4c9808e02ba (diff) | |
download | ruby-289ce68af0db09b8938972e91de13a384c3538a1.tar.gz ruby-289ce68af0db09b8938972e91de13a384c3538a1.tar.xz ruby-289ce68af0db09b8938972e91de13a384c3538a1.zip |
add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r-- | test/ruby/test_m17n.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb index 1779e474c..63e471b2e 100644 --- a/test/ruby/test_m17n.rb +++ b/test/ruby/test_m17n.rb @@ -864,6 +864,14 @@ class TestM17N < Test::Unit::TestCase assert_equal(["a"], e("\xa1\xa2a\xa3\xa4").scan(/a/)) end + def test_scan_dup + s1 = e("\xa4\xa2")*100 + s2 = s1.dup.force_encoding("ascii-8bit") + s2.scan(/\A./n) {|f| + assert_equal(Encoding::ASCII_8BIT, f.encoding) + } + end + def test_upto s1 = e("\xa1\xa2") s2 = s("\xa1\xa2") |