~ubuntu-branches/ubuntu/quantal/ruby1.9.1/quantal

« back to all changes in this revision

Viewing changes to test/uri/test_generic.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2011-09-24 19:16:17 UTC
  • mfrom: (1.1.8 upstream) (13.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20110924191617-o1qz4rcmqjot8zuy
Tags: 1.9.3~rc1-1
* New upstream release: 1.9.3 RC1.
  + Includes load.c fixes. Closes: #639959.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
706
706
    assert_raise(URI::InvalidURIError) { uri.path = 'bar' }
707
707
    assert_raise(URI::InvalidURIError) { uri.query = 'bar' }
708
708
  end
 
709
 
 
710
  def test_ipv6
 
711
    assert_equal("[::1]", URI("http://[::1]/bar/baz").host)
 
712
    assert_equal("::1", URI("http://[::1]/bar/baz").hostname)
 
713
 
 
714
    u = URI("http://foo/bar")
 
715
    assert_equal("http://foo/bar", u.to_s)
 
716
    u.hostname = "::1"
 
717
    assert_equal("http://[::1]/bar", u.to_s)
 
718
  end
709
719
end