镜像来自
https://github.com/redmine/redmine.git
synced 2024-08-08 14:11:04 +02:00
f50544bb15
git-svn-id: http://redmine.rubyforge.org/svn/trunk@134 e93f8b46-1217-0410-a6f0-8f06a7374b81
38 line
829 B
Ruby
38 line
829 B
Ruby
# $Id: testfilter.rb 122 2006-05-15 20:03:56Z blackhedd $
|
|
#
|
|
#
|
|
|
|
require 'test/unit'
|
|
|
|
$:.unshift "lib"
|
|
|
|
require 'net/ldap'
|
|
|
|
|
|
class TestFilter < Test::Unit::TestCase
|
|
|
|
def setup
|
|
end
|
|
|
|
|
|
def teardown
|
|
end
|
|
|
|
def test_rfc_2254
|
|
p Net::LDAP::Filter.from_rfc2254( " ( uid=george* ) " )
|
|
p Net::LDAP::Filter.from_rfc2254( "uid!=george*" )
|
|
p Net::LDAP::Filter.from_rfc2254( "uid<george*" )
|
|
p Net::LDAP::Filter.from_rfc2254( "uid <= george*" )
|
|
p Net::LDAP::Filter.from_rfc2254( "uid>george*" )
|
|
p Net::LDAP::Filter.from_rfc2254( "uid>=george*" )
|
|
p Net::LDAP::Filter.from_rfc2254( "uid!=george*" )
|
|
|
|
p Net::LDAP::Filter.from_rfc2254( "(& (uid!=george* ) (mail=*))" )
|
|
p Net::LDAP::Filter.from_rfc2254( "(| (uid!=george* ) (mail=*))" )
|
|
p Net::LDAP::Filter.from_rfc2254( "(! (mail=*))" )
|
|
end
|
|
|
|
|
|
end
|
|
|