GH-48 Ensure escaped filters work

This commit is contained in:
Mark Cavage 2012-01-19 08:04:07 -08:00
parent c908d8f0dc
commit 1690a3f3f1
1 changed files with 19 additions and 0 deletions

19
tst/filters/parse.test.js Normal file
View File

@ -0,0 +1,19 @@
// Copyright 2011 Mark Cavage, Inc. All rights reserved.
var test = require('tap').test;
var parse = require('../../lib/index').parseFilter;
test('GH-48 XML Strings in filter', function(t) {
var str = '(&(CentralUIEnrollments=\\<mydoc\\>*)(objectClass=User))';
var f = parse(str);
t.ok(f);
t.ok(f.filters);
t.equal(f.filters.length, 2);
f.filters.forEach(function(filter) {
t.ok(filter.attribute);
});
t.end();
});