ruby-changes:3835
From: ko1@a...
Date: Tue, 29 Jan 2008 22:07:36 +0900 (JST)
Subject: [ruby-changes:3835] akr - Ruby:r15324 (trunk): add tests.
akr 2008-01-29 22:07:25 +0900 (Tue, 29 Jan 2008) New Revision: 15324 Modified files: trunk/test/ruby/test_m17n.rb Log: add tests. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_m17n.rb?r1=15324&r2=15323&diff_format=u Index: test/ruby/test_m17n.rb =================================================================== --- test/ruby/test_m17n.rb (revision 15323) +++ test/ruby/test_m17n.rb (revision 15324) @@ -1082,4 +1082,12 @@ assert_regexp_usascii_literal('/\u1234\x80/', nil, SyntaxError) assert_regexp_usascii_literal('/\u1234#{}\x80/', nil, ArgumentError) end + + def test_gbk + assert_equal("", "\x81\x40".force_encoding("GBK").chop) + end + + def test_euc_tw + assert_equal("a", "a\x8e\xa2\xa1\xa1".force_encoding("euc-tw").chop) + end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/