To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / cf / cfcd7c9b97a7c386801c8595e27a26562b98c813.svn-base @ 1297:0a574315af3e
History | View | Annotate | Download (829 Bytes)
| 1 |
# $Id: testfilter.rb 122 2006-05-15 20:03:56Z blackhedd $ |
|---|---|
| 2 |
# |
| 3 |
# |
| 4 |
|
| 5 |
require 'test/unit' |
| 6 |
|
| 7 |
$:.unshift "lib" |
| 8 |
|
| 9 |
require 'net/ldap' |
| 10 |
|
| 11 |
|
| 12 |
class TestFilter < Test::Unit::TestCase |
| 13 |
|
| 14 |
def setup |
| 15 |
end |
| 16 |
|
| 17 |
|
| 18 |
def teardown |
| 19 |
end |
| 20 |
|
| 21 |
def test_rfc_2254 |
| 22 |
p Net::LDAP::Filter.from_rfc2254( " ( uid=george* ) " ) |
| 23 |
p Net::LDAP::Filter.from_rfc2254( "uid!=george*" ) |
| 24 |
p Net::LDAP::Filter.from_rfc2254( "uid<george*" ) |
| 25 |
p Net::LDAP::Filter.from_rfc2254( "uid <= george*" ) |
| 26 |
p Net::LDAP::Filter.from_rfc2254( "uid>george*" ) |
| 27 |
p Net::LDAP::Filter.from_rfc2254( "uid>=george*" ) |
| 28 |
p Net::LDAP::Filter.from_rfc2254( "uid!=george*" ) |
| 29 |
|
| 30 |
p Net::LDAP::Filter.from_rfc2254( "(& (uid!=george* ) (mail=*))" ) |
| 31 |
p Net::LDAP::Filter.from_rfc2254( "(| (uid!=george* ) (mail=*))" ) |
| 32 |
p Net::LDAP::Filter.from_rfc2254( "(! (mail=*))" ) |
| 33 |
end |
| 34 |
|
| 35 |
|
| 36 |
end |
| 37 |
|