summaryrefslogtreecommitdiffstats
path: root/test/ruby/test_m17n.rb
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-08 10:18:56 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-02-08 10:18:56 +0000
commit0bbdc60790493089ee8c915d61aad1d45f39a36b (patch)
tree3484eeb77b0ce78311650b52f08af98c3b0be7b7 /test/ruby/test_m17n.rb
parentb79c50b8ba378fc5948f4e50017e31b0ec863c57 (diff)
downloadruby-0bbdc60790493089ee8c915d61aad1d45f39a36b.tar.gz
ruby-0bbdc60790493089ee8c915d61aad1d45f39a36b.tar.xz
ruby-0bbdc60790493089ee8c915d61aad1d45f39a36b.zip
add a test.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_m17n.rb')
-rw-r--r--test/ruby/test_m17n.rb8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/ruby/test_m17n.rb b/test/ruby/test_m17n.rb
index 63e471b2e..deb20d52f 100644
--- a/test/ruby/test_m17n.rb
+++ b/test/ruby/test_m17n.rb
@@ -864,7 +864,7 @@ class TestM17N < Test::Unit::TestCase
assert_equal(["a"], e("\xa1\xa2a\xa3\xa4").scan(/a/))
end
- def test_scan_dup
+ def test_dup_scan
s1 = e("\xa4\xa2")*100
s2 = s1.dup.force_encoding("ascii-8bit")
s2.scan(/\A./n) {|f|
@@ -872,6 +872,12 @@ class TestM17N < Test::Unit::TestCase
}
end
+ def test_dup_aref
+ s1 = e("\xa4\xa2")*100
+ s2 = s1.dup.force_encoding("ascii-8bit")
+ assert_equal(Encoding::ASCII_8BIT, s2[10..-1].encoding)
+ end
+
def test_upto
s1 = e("\xa1\xa2")
s2 = s("\xa1\xa2")