From 5543a55b5261bf1c72b9bc356c2f84b14e4e6231 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 11 Mar 2014 04:22:34 +0000 Subject: [PATCH] * test: get rid of warnings. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/fileutils/test_fileutils.rb | 2 +- test/mkmf/test_framework.rb | 2 +- test/strscan/test_stringscanner.rb | 2 +- test/testunit/test_redefinition.rb | 4 ++-- test/webrick/test_httprequest.rb | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/fileutils/test_fileutils.rb b/test/fileutils/test_fileutils.rb index b733488cf8..0834187b95 100644 --- a/test/fileutils/test_fileutils.rb +++ b/test/fileutils/test_fileutils.rb @@ -1093,7 +1093,7 @@ class TestFileUtils < Test::Unit::TestCase assert_output_lines([]) { touch 'tmp/b' # string input for group, -1 for user - chown -1, input_group_2, 'tmp/b' + chown(-1, input_group_2, 'tmp/b') assert_ownership_group @groups[1], 'tmp/b' } end if have_file_perm? diff --git a/test/mkmf/test_framework.rb b/test/mkmf/test_framework.rb index 48e8bf7213..3585f959f9 100644 --- a/test/mkmf/test_framework.rb +++ b/test/mkmf/test_framework.rb @@ -36,7 +36,7 @@ class TestMkmf end def test_different_name_header - bug8593 = '[ruby-core:55745] [Bug #8593]' + _bug8593 = '[ruby-core:55745] [Bug #8593]' create_framework("MkmfTest", "test_mkmf.h") do |fw, hdrname| assert(!have_framework(fw), MKMFLOG) assert(have_framework([fw, hdrname]), MKMFLOG) diff --git a/test/strscan/test_stringscanner.rb b/test/strscan/test_stringscanner.rb index be548d1938..e2e476630c 100644 --- a/test/strscan/test_stringscanner.rb +++ b/test/strscan/test_stringscanner.rb @@ -461,7 +461,7 @@ class TestStringScanner < Test::Unit::TestCase assert_equal true, s[4].tainted? s = StringScanner.new("foo bar baz") - s.scan /(?\w+) (?\w+) (\w+)/ + s.scan(/(?\w+) (?\w+) (\w+)/) assert_equal 'foo', s[1] assert_equal 'bar', s[2] assert_nil s[3] diff --git a/test/testunit/test_redefinition.rb b/test/testunit/test_redefinition.rb index 4540461be1..ed11621351 100644 --- a/test/testunit/test_redefinition.rb +++ b/test/testunit/test_redefinition.rb @@ -2,8 +2,8 @@ require 'test/unit' class TestRedefinition < Test::Unit::TestCase def test_redefinition - assert_match /^test\/unit warning: method TestForTestRedefinition#test_redefinition is redefined$/, - redefinition + assert_match(/^test\/unit warning: method TestForTestRedefinition#test_redefinition is redefined$/, + redefinition) end def redefinition(*args) diff --git a/test/webrick/test_httprequest.rb b/test/webrick/test_httprequest.rb index 0ce6b4f40f..3a7e67579f 100644 --- a/test/webrick/test_httprequest.rb +++ b/test/webrick/test_httprequest.rb @@ -349,7 +349,7 @@ GET / l = msg.size req.continue assert_not_equal l, msg.size - assert_match /HTTP\/1.1 100 continue\r\n\r\n\z/, msg + assert_match(/HTTP\/1.1 100 continue\r\n\r\n\z/, msg) assert !req['expect'] end