diff options
author | Apehaenger <joerg@ebeling.ws> | 2021-07-20 18:27:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-20 18:27:06 +0200 |
commit | 6ebc2104fcbfff2ae083098f7c2c08f7ae4f6679 (patch) | |
tree | 0d4b44f6a73e9369efcf6675cf8ed2079447762d /filter_test.go | |
parent | Fix examples (#6) (diff) | |
download | ldap-6ebc2104fcbfff2ae083098f7c2c08f7ae4f6679.tar ldap-6ebc2104fcbfff2ae083098f7c2c08f7ae4f6679.tar.gz ldap-6ebc2104fcbfff2ae083098f7c2c08f7ae4f6679.tar.bz2 ldap-6ebc2104fcbfff2ae083098f7c2c08f7ae4f6679.tar.lz ldap-6ebc2104fcbfff2ae083098f7c2c08f7ae4f6679.tar.xz ldap-6ebc2104fcbfff2ae083098f7c2c08f7ae4f6679.tar.zst ldap-6ebc2104fcbfff2ae083098f7c2c08f7ae4f6679.zip |
Diffstat (limited to 'filter_test.go')
-rw-r--r-- | filter_test.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/filter_test.go b/filter_test.go index 2e62f25..5244c8a 100644 --- a/filter_test.go +++ b/filter_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/nmcclain/asn1-ber" + ber "github.com/nmcclain/asn1-ber" ) type compileTest struct { @@ -13,18 +13,18 @@ type compileTest struct { } var testFilters = []compileTest{ - compileTest{filterStr: "(&(sn=Miller)(givenName=Bob))", filterType: FilterAnd}, - compileTest{filterStr: "(|(sn=Miller)(givenName=Bob))", filterType: FilterOr}, - compileTest{filterStr: "(!(sn=Miller))", filterType: FilterNot}, - compileTest{filterStr: "(sn=Miller)", filterType: FilterEqualityMatch}, - compileTest{filterStr: "(sn=Mill*)", filterType: FilterSubstrings}, - compileTest{filterStr: "(sn=*Mill)", filterType: FilterSubstrings}, - compileTest{filterStr: "(sn=*Mill*)", filterType: FilterSubstrings}, - compileTest{filterStr: "(sn>=Miller)", filterType: FilterGreaterOrEqual}, - compileTest{filterStr: "(sn<=Miller)", filterType: FilterLessOrEqual}, - compileTest{filterStr: "(sn=*)", filterType: FilterPresent}, - compileTest{filterStr: "(sn~=Miller)", filterType: FilterApproxMatch}, - // compileTest{ filterStr: "()", filterType: FilterExtensibleMatch }, + {filterStr: "(&(sn=Müller)(givenName=Bob))", filterType: FilterAnd}, + {filterStr: "(|(sn=Möller)(givenName=Bob))", filterType: FilterOr}, + {filterStr: "(!(sn=Møller))", filterType: FilterNot}, + {filterStr: "(sn=Müller)", filterType: FilterEqualityMatch}, + {filterStr: "(sn=Möll*)", filterType: FilterSubstrings}, + {filterStr: "(sn=*Møll)", filterType: FilterSubstrings}, + {filterStr: "(sn=*Müll*)", filterType: FilterSubstrings}, + {filterStr: "(sn>=Möller)", filterType: FilterGreaterOrEqual}, + {filterStr: "(sn<=Møller)", filterType: FilterLessOrEqual}, + {filterStr: "(sn=*)", filterType: FilterPresent}, + {filterStr: "(sn~=Müller)", filterType: FilterApproxMatch}, + // { filterStr: "()", filterType: FilterExtensibleMatch }, } func TestFilter(t *testing.T) { |