@@ -4,27 +4,27 @@ var test = require('utest');
4
4
5
5
test ( 'SqlString.escapeId' , {
6
6
'value is quoted' : function ( ) {
7
- assert . equal ( '`id`' , SqlString . escapeId ( 'id' ) ) ;
7
+ assert . equal ( SqlString . escapeId ( 'id' ) , '`id`' ) ;
8
8
} ,
9
9
10
10
'value can be a number' : function ( ) {
11
- assert . equal ( '`42`' , SqlString . escapeId ( 42 ) ) ;
11
+ assert . equal ( SqlString . escapeId ( 42 ) , '`42`' ) ;
12
12
} ,
13
13
14
14
'value containing escapes is quoted' : function ( ) {
15
- assert . equal ( '`i``d`' , SqlString . escapeId ( 'i`d' ) ) ;
15
+ assert . equal ( SqlString . escapeId ( 'i`d' ) , '`i``d`' ) ;
16
16
} ,
17
17
18
18
'value containing separator is quoted' : function ( ) {
19
- assert . equal ( '` id1`.` id2`' , SqlString . escapeId ( ' id1. id2' ) ) ;
19
+ assert . equal ( SqlString . escapeId ( ' id1. id2' ) , '` id1`.` id2`' ) ;
20
20
} ,
21
21
22
22
'value containing separator and escapes is quoted' : function ( ) {
23
- assert . equal ( '` id``1`.`i``d2`' , SqlString . escapeId ( ' id`1.i`d2' ) ) ;
23
+ assert . equal ( SqlString . escapeId ( ' id`1.i`d2' ) , '` id``1`.`i``d2`' ) ;
24
24
} ,
25
25
26
26
'value containing separator is fully escaped when forbidQualified' : function ( ) {
27
- assert . equal ( '`id1.id2`' , SqlString . escapeId ( 'id1.id2' , true ) ) ;
27
+ assert . equal ( SqlString . escapeId ( 'id1.id2' , true ) , '`id1.id2`' ) ;
28
28
} ,
29
29
30
30
'arrays are turned into lists' : function ( ) {
0 commit comments