ruby-changes:13689
From: yugui <ko1@a...>
Date: Sun, 25 Oct 2009 23:46:29 +0900 (JST)
Subject: [ruby-changes:13689] Ruby:r25476 (ruby_1_9_1): * test/ruby/test_m17n.rb (TestM17N#test_sprintf_s):
yugui 2009-10-25 23:46:01 +0900 (Sun, 25 Oct 2009) New Revision: 25476 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=25476 Log: * test/ruby/test_m17n.rb (TestM17N#test_sprintf_s): added an assertion for [ruby-list:46274]. see also r24506. Modified files: branches/ruby_1_9_1/ChangeLog branches/ruby_1_9_1/test/ruby/test_m17n.rb Index: ruby_1_9_1/ChangeLog =================================================================== --- ruby_1_9_1/ChangeLog (revision 25475) +++ ruby_1_9_1/ChangeLog (revision 25476) @@ -1,3 +1,9 @@ +Fri Oct 23 10:51:04 2009 Yuki Sonoda (Yugui) <yugui@y...> + + * test/ruby/test_m17n.rb (TestM17N#test_sprintf_s): + added an assertion for [ruby-list:46274]. + see also r24506. + Tue Oct 20 17:57:31 2009 Nobuyoshi Nakada <nobu@r...> * marshal.c (w_symbol, r_symreal): fixed the order of symbol and Index: ruby_1_9_1/test/ruby/test_m17n.rb =================================================================== --- ruby_1_9_1/test/ruby/test_m17n.rb (revision 25475) +++ ruby_1_9_1/test/ruby/test_m17n.rb (revision 25476) @@ -11,6 +11,7 @@ def e(str) str.dup.force_encoding("EUC-JP") end def s(str) str.dup.force_encoding("Windows-31J") end def u(str) str.dup.force_encoding("UTF-8") end + def ua(str) str.dup.force_encoding("US-ASCII") end end include AESU extend AESU @@ -807,6 +808,8 @@ assert_strenc("\x00", 'Windows-31J', s("%s") % s("\x00")) assert_strenc("\x00", 'UTF-8', u("%s") % u("\x00")) assert_equal("EUC-JP", (e("\xc2\xa1 %s") % "foo").encoding.name) + + assert_equal("EUC-JP", (e("%s: %s: %s") % [ua("abc"), u("a"), e("\xc2\xa1")]).encoding.name, "[ruby-list:46274]") end def test_str_lt -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/