From b8f987b36ce2faec42cd20cd9bfe95f406494526 Mon Sep 17 00:00:00 2001 From: nobu Date: Mon, 7 Mar 2016 19:39:32 +0000 Subject: test_rubyoptions.rb: fix test * test/ruby/test_rubyoptions.rb (test_shebang): adjust only expected stderr as a warning, assertion has meaning on all platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rubyoptions.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/ruby') diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb index 6ee151e5e8..82fc5e44e7 100644 --- a/test/ruby/test_rubyoptions.rb +++ b/test/ruby/test_rubyoptions.rb @@ -312,9 +312,10 @@ class TestRubyOptions < Test::Unit::TestCase 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/) + warning = /mswin|mingw/ =~ RUBY_PLATFORM ? [] : /shebang line ends with \\r/ assert_in_out_err([{'RUBYOPT' => nil}], "#!ruby -KU -Eutf-8\r\np \"\u3042\"\r\n", - ["\"\u3042\""], /shebang line ends with \\r/, - encoding: Encoding::UTF_8) if /mswin|mingw/ !~ RUBY_PLATFORM + ["\"\u3042\""], warning, + encoding: Encoding::UTF_8) bug4118 = '[ruby-dev:42680]' assert_in_out_err(%w[], "#!/bin/sh\n""#!shebang\n""#!ruby\n""puts __LINE__\n", -- cgit v1.2.3