ruby-changes:3913
From: ko1@a...
Date: Fri, 8 Feb 2008 19:19:27 +0900 (JST)
Subject: [ruby-changes:3913] akr - Ruby:r15403 (trunk): add a test.
akr 2008-02-08 19:18:56 +0900 (Fri, 08 Feb 2008)
New Revision: 15403
Modified files:
trunk/test/ruby/test_m17n.rb
Log:
add a test.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_m17n.rb?r1=15403&r2=15402&diff_format=u
Index: test/ruby/test_m17n.rb
===================================================================
--- test/ruby/test_m17n.rb (revision 15402)
+++ test/ruby/test_m17n.rb (revision 15403)
@@ -864,7 +864,7 @@
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 @@
}
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")
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/