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:
parent
1c0416e6ee
commit
b8a9eb304d
1 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue