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@15530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
57ae6ad003
commit
bcf1e2ac12
1 changed files with 6 additions and 0 deletions
|
@ -259,4 +259,10 @@ EOT
|
|||
assert_str_equal("ab".encode("utf-16be"), r[0])
|
||||
assert_str_equal("cd".encode("utf-16be"), r[1])
|
||||
end
|
||||
|
||||
def test_count
|
||||
e = "abc".count("^b")
|
||||
assert_equal(e, "abc".encode("utf-16be").count("^b".encode("utf-16be")))
|
||||
assert_equal(e, "abc".encode("utf-16le").count("^b".encode("utf-16le")))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue