mirror of
https://github.com/brianc/node-postgres.git
synced 2026-02-01 16:47:23 +00:00
fix failing array test - closes #125
This commit is contained in:
parent
913207575b
commit
31566cf056
@ -68,11 +68,11 @@ test('parsing array results', function() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
test('element containing quote char', function(){
|
test('element containing quote char', function(){
|
||||||
client.query("SELECT '{\"joe''\",jim'',\"bob\\\\\"\"}'::text[] as names", assert.success(function(result) {
|
client.query("SELECT ARRAY['joe''', 'jim', 'bob\"'] AS names", assert.success(function(result) {
|
||||||
var names = result.rows[0].names;
|
var names = result.rows[0].names;
|
||||||
assert.lengthIs(names, 3);
|
assert.lengthIs(names, 3);
|
||||||
assert.equal(names[0], 'joe\'');
|
assert.equal(names[0], 'joe\'');
|
||||||
assert.equal(names[1], 'jim\'');
|
assert.equal(names[1], 'jim');
|
||||||
assert.equal(names[2], 'bob"');
|
assert.equal(names[2], 'bob"');
|
||||||
pg.end();
|
pg.end();
|
||||||
}))
|
}))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user