1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add a test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-12-28 16:13:43 +00:00
parent 1c0416e6ee
commit b8a9eb304d

View file

@ -541,4 +541,11 @@ class TestStringScanner < Test::Unit::TestCase
ss = StringScanner.new("\xA1\xA2".force_encoding("euc-jp"))
assert_equal(Encoding::EUC_JP, ss.scan(/./e).encoding)
end
def test_generic_regexp
ss = StringScanner.new("\xA1\xA2".force_encoding("euc-jp"))
t = ss.scan(/./)
assert_equal("\xa1\xa1".force_encoding("euc-jp"), t)
end
end