diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-04 15:42:13 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-02-04 15:42:13 +0000 |
commit | bfc9c99715be13a8053067d8900b2219c10534e1 (patch) | |
tree | 1cfb2847635726352210d8d3ebb90483a5079456 /test/socket/test_addrinfo.rb | |
parent | ca4c991cddf739c3319491cade7baebda250e9fb (diff) | |
download | ruby-bfc9c99715be13a8053067d8900b2219c10534e1.tar.gz ruby-bfc9c99715be13a8053067d8900b2219c10534e1.tar.xz ruby-bfc9c99715be13a8053067d8900b2219c10534e1.zip |
test relaxed.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@22046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket/test_addrinfo.rb')
-rw-r--r-- | test/socket/test_addrinfo.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/socket/test_addrinfo.rb b/test/socket/test_addrinfo.rb index 8ddbb0698..d75ce3b7a 100644 --- a/test/socket/test_addrinfo.rb +++ b/test/socket/test_addrinfo.rb @@ -514,12 +514,16 @@ class TestSocketAddrInfo < Test::Unit::TestCase end def test_ipv6_to_ipv4 - ai = AddrInfo.ip("::192.0.2.3").ipv6_to_ipv4 + ai = AddrInfo.ip("::192.0.2.3") + ai = ai.ipv6_to_ipv4 if !ai.ipv4? assert(ai.ipv4?) assert_equal("192.0.2.3", ai.ip_address) - ai = AddrInfo.ip("::ffff:192.0.2.3").ipv6_to_ipv4 + + ai = AddrInfo.ip("::ffff:192.0.2.3") + ai = ai.ipv6_to_ipv4 if !ai.ipv4? assert(ai.ipv4?) assert_equal("192.0.2.3", ai.ip_address) + assert_nil(AddrInfo.ip("::1").ipv6_to_ipv4) assert_nil(AddrInfo.ip("192.0.2.3").ipv6_to_ipv4) if HAS_UNIXSOCKET |