[前][次][番号順一覧][スレッド一覧]

ruby-changes:41920

From: nobu <ko1@a...>
Date: Fri, 4 Mar 2016 13:34:23 +0900 (JST)
Subject: [ruby-changes:41920] nobu:r53994 (trunk): test_rubyoptions.rb: encoding option

nobu	2016-03-04 13:34:17 +0900 (Fri, 04 Mar 2016)

  New Revision: 53994

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53994

  Log:
    test_rubyoptions.rb: encoding option
    
    * test/ruby/test_rubyoptions.rb (test_shebang): use encoding
      option to assert_in_out_err.

  Modified files:
    trunk/test/ruby/test_rubyoptions.rb
Index: test/ruby/test_rubyoptions.rb
===================================================================
--- test/ruby/test_rubyoptions.rb	(revision 53993)
+++ test/ruby/test_rubyoptions.rb	(revision 53994)
@@ -312,10 +312,9 @@ class TestRubyOptions < Test::Unit::Test https://github.com/ruby/ruby/blob/trunk/test/ruby/test_rubyoptions.rb#L312
     assert_in_out_err([], "#! /test_r_u_b_y_test_r_u_b_y_options_foobarbazqux -foo -bar\r\np 1\r\n",
                       [], /: no Ruby script found in input/)
 
-    assert_in_out_err([{'RUBYOPT' => nil}], "#!ruby -KU -Eutf-8\r\np \"\u3042\"\r\n") do |r, e|
-      assert_equal("\"\u3042\"", r.join.force_encoding(Encoding::UTF_8))
-      assert_equal([], e)
-    end
+    assert_in_out_err([{'RUBYOPT' => nil}], "#!ruby -KU -Eutf-8\r\np \"\u3042\"\r\n",
+                      ["\"\u3042\""], [],
+                      encoding: Encoding::UTF_8)
 
     bug4118 = '[ruby-dev:42680]'
     assert_in_out_err(%w[], "#!/bin/sh\n""#!shebang\n""#!ruby\n""puts __LINE__\n",

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]