mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 16:44:01 +02:00
suppress warnings: URI.regexp is obsolete
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46572 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b0bc563550
commit
36a043a93a
1 changed files with 13 additions and 11 deletions
|
@ -33,17 +33,19 @@ class TestCommon < Test::Unit::TestCase
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_regexp
|
def test_regexp
|
||||||
assert_instance_of Regexp, URI.regexp
|
EnvUtil.suppress_warning do
|
||||||
assert_instance_of Regexp, URI.regexp(['http'])
|
assert_instance_of Regexp, URI.regexp
|
||||||
assert_equal URI.regexp, URI.regexp
|
assert_instance_of Regexp, URI.regexp(['http'])
|
||||||
assert_equal 'http://', 'x http:// x'.slice(URI.regexp)
|
assert_equal URI.regexp, URI.regexp
|
||||||
assert_equal 'http://', 'x http:// x'.slice(URI.regexp(['http']))
|
assert_equal 'http://', 'x http:// x'.slice(URI.regexp)
|
||||||
assert_equal 'http://', 'x http:// x ftp://'.slice(URI.regexp(['http']))
|
assert_equal 'http://', 'x http:// x'.slice(URI.regexp(['http']))
|
||||||
assert_equal nil, 'http://'.slice(URI.regexp([]))
|
assert_equal 'http://', 'x http:// x ftp://'.slice(URI.regexp(['http']))
|
||||||
assert_equal nil, ''.slice(URI.regexp)
|
assert_equal nil, 'http://'.slice(URI.regexp([]))
|
||||||
assert_equal nil, 'xxxx'.slice(URI.regexp)
|
assert_equal nil, ''.slice(URI.regexp)
|
||||||
assert_equal nil, ':'.slice(URI.regexp)
|
assert_equal nil, 'xxxx'.slice(URI.regexp)
|
||||||
assert_equal 'From:', 'From:'.slice(URI.regexp)
|
assert_equal nil, ':'.slice(URI.regexp)
|
||||||
|
assert_equal 'From:', 'From:'.slice(URI.regexp)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_kernel_uri
|
def test_kernel_uri
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue