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@15530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-02-18 00:08:01 +00:00
parent 57ae6ad003
commit bcf1e2ac12

View file

@ -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