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@15182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9430d7d803
commit
5628d949f9
1 changed files with 3 additions and 0 deletions
|
@ -297,6 +297,9 @@ class TestM17N < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_utf16
|
||||
s = "aa".force_encoding("utf-16be")
|
||||
assert_raise(ArgumentError, "Time.now.strftime(#{encdump s})") { Time.now.strftime(s) }
|
||||
|
||||
s = "aaaa".force_encoding("utf-16be")
|
||||
assert_equal(s.encoding, s.intern.to_s.encoding, "#{encdump s}.intern.to_s.encoding")
|
||||
|
||||
|
|
Loading…
Reference in a new issue