test escaped single hex char at end of filter
This commit is contained in:
parent
ecfefa7ff0
commit
ed70fd7615
|
@ -27,12 +27,12 @@ test('GH-50 = in filter', function (t) {
|
|||
})
|
||||
|
||||
test('convert to hex code', function (t) {
|
||||
const str = 'foo=bar\\(abcd\\e\\fg\\h\\69\\'
|
||||
const str = 'foo=bar\\(abcd\\e\\fg\\h\\69\\a'
|
||||
const f = parse(str)
|
||||
t.ok(f)
|
||||
t.equal(f.attribute, 'foo')
|
||||
t.equal(f.value, 'bar(abcdefghi\\')
|
||||
t.equal(f.toString(), '(foo=bar\\28abcdefghi\\5c)')
|
||||
t.equal(f.value, 'bar(abcdefghia')
|
||||
t.equal(f.toString(), '(foo=bar\\28abcdefghia)')
|
||||
t.end()
|
||||
})
|
||||
|
||||
|
@ -66,6 +66,16 @@ test('\\ in filter', function (t) {
|
|||
t.end()
|
||||
})
|
||||
|
||||
test('not escaped \\ at end of filter', function (t) {
|
||||
const str = 'foo=bar\\'
|
||||
const f = parse(str)
|
||||
t.ok(f)
|
||||
t.equal(f.attribute, 'foo')
|
||||
t.equal(f.value, 'bar\\')
|
||||
t.equal(f.toString(), '(foo=bar\\5c)')
|
||||
t.end()
|
||||
})
|
||||
|
||||
test('* in equality filter', function (t) {
|
||||
const str = '(foo=bar\\*)'
|
||||
const f = parse(str)
|
||||
|
|
Loading…
Reference in New Issue