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

« back to all changes in this revision

Viewing changes to test/uri/test_ldap.rb

  • Committer: Bazaar Package Importer
  • Author(s): Lucas Nussbaum
  • Date: 2010-07-31 17:08:39 UTC
  • mfrom: (1.1.4 upstream) (8.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20100731170839-j034dmpdqt1cc4p6
Tags: 1.9.2~svn28788-1
* New release based on upstream snapshot from the 1.9.2 branch,
  after 1.9.2 RC2. That branch is (supposed to be) binary-compatible
  with the 1.9.1 branch.
  + Builds fine on i386. Closes: #580852.
* Upgrade to Standards-Version: 3.9.1. No changes needed.
* Updated generated incs.
* Patches that still need work:
  + Unclear status, need more investigation:
   090729_fix_Makefile_deps.dpatch
   090803_exclude_rdoc.dpatch
   203_adjust_base_of_search_path.dpatch
   902_define_YAML_in_yaml_stringio.rb.dpatch
   919_common.mk_tweaks.dpatch
   931_libruby_suffix.dpatch
   940_test_thread_mutex_sync_shorter.dpatch
  + Maybe not needed anymore, keeping but not applying.
   102_skip_test_copy_stream.dpatch (test doesn't block anymore?)
   104_skip_btest_io.dpatch (test doesn't block anymore?)
   201_gem_prelude.dpatch (we don't use that rubygems anyway?)
   202_gem_default_dir.dpatch (we don't use that rubygems anyway?)
   940_test_file_exhaustive_fails_as_root.dpatch
   940_test_priority_fails.dpatch
   100518_load_libc_libm.dpatch
* Add disable-tests.diff: disable some tests that cause failures on FreeBSD.
  Closes: #590002, #543805, #542927.
* However, many new failures on FreeBSD. Since that version is still an
  improvement, add the check that makes test suite failures non-fatal on
  FreeBSD again. That still needs to be investigated.
* Re-add 903_skip_base_ruby_check.dpatch
* Add build-dependency on ruby1.8 and drop all pre-generated files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    # from RFC2255, section 6.
39
39
    urls = {
40
40
      'ldap:///o=University%20of%20Michigan,c=US' =>
41
 
      ['ldap', nil, URI::LDAP::DEFAULT_PORT, 
42
 
        'o=University%20of%20Michigan,c=US', 
 
41
      ['ldap', nil, URI::LDAP::DEFAULT_PORT,
 
42
        'o=University%20of%20Michigan,c=US',
43
43
        nil, nil, nil, nil],
44
44
 
45
45
      'ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US' =>
46
 
      ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT, 
47
 
        'o=University%20of%20Michigan,c=US', 
 
46
      ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
 
47
        'o=University%20of%20Michigan,c=US',
48
48
        nil, nil, nil, nil],
49
49
 
50
50
      'ldap://ldap.itd.umich.edu/o=University%20of%20Michigan,c=US?postalAddress' =>
51
 
      ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT, 
 
51
      ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
52
52
        'o=University%20of%20Michigan,c=US',
53
53
        'postalAddress', nil, nil, nil],
54
54
 
55
55
      'ldap://host.com:6666/o=University%20of%20Michigan,c=US??sub?(cn=Babs%20Jensen)' =>
56
 
      ['ldap', 'host.com', 6666, 
 
56
      ['ldap', 'host.com', 6666,
57
57
        'o=University%20of%20Michigan,c=US',
58
58
        nil, 'sub', '(cn=Babs%20Jensen)', nil],
59
59
 
60
60
      'ldap://ldap.itd.umich.edu/c=GB?objectClass?one' =>
61
 
      ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT, 
62
 
        'c=GB', 
 
61
      ['ldap', 'ldap.itd.umich.edu', URI::LDAP::DEFAULT_PORT,
 
62
        'c=GB',
63
63
        'objectClass', 'one', nil, nil],
64
64
 
65
65
      'ldap://ldap.question.com/o=Question%3f,c=US?mail' =>
66
 
      ['ldap', 'ldap.question.com', URI::LDAP::DEFAULT_PORT, 
 
66
      ['ldap', 'ldap.question.com', URI::LDAP::DEFAULT_PORT,
67
67
        'o=Question%3f,c=US',
68
68
        'mail', nil, nil, nil],
69
69
 
70
70
      'ldap://ldap.netscape.com/o=Babsco,c=US??(int=%5c00%5c00%5c00%5c04)' =>
71
 
      ['ldap', 'ldap.netscape.com', URI::LDAP::DEFAULT_PORT, 
 
71
      ['ldap', 'ldap.netscape.com', URI::LDAP::DEFAULT_PORT,
72
72
        'o=Babsco,c=US',
73
73
        nil, '(int=%5c00%5c00%5c00%5c04)', nil, nil],
74
74
 
75
75
      'ldap:///??sub??bindname=cn=Manager%2co=Foo' =>
76
 
      ['ldap', nil, URI::LDAP::DEFAULT_PORT, 
 
76
      ['ldap', nil, URI::LDAP::DEFAULT_PORT,
77
77
        '',
78
78
        nil, 'sub', nil, 'bindname=cn=Manager%2co=Foo'],
79
79
 
80
80
      'ldap:///??sub??!bindname=cn=Manager%2co=Foo' =>
81
 
      ['ldap', nil, URI::LDAP::DEFAULT_PORT, 
 
81
      ['ldap', nil, URI::LDAP::DEFAULT_PORT,
82
82
        '',
83
83
        nil, 'sub', nil, '!bindname=cn=Manager%2co=Foo'],
84
 
    }.each do |url, ary|
85
 
      u = URI.parse(url)
 
84
    }.each do |url2, ary|
 
85
      u = URI.parse(url2)
86
86
      assert_equal(ary, uri_to_ary(u))
87
87
    end
88
88
  end