File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,24 @@ test('ConnectionConfig#Constructor', {
43
43
assert . equal ( config . clientFlags & common . ClientConstants . CLIENT_FOUND_ROWS , 0 ) ;
44
44
} ,
45
45
46
+ 'accepts multiple client flags' : function ( ) {
47
+ var config = new ConnectionConfig ( { flags : '-FOUND_ROWS,+IGNORE_SPACE' } ) ;
48
+ assert . equal ( config . clientFlags & common . ClientConstants . CLIENT_FOUND_ROWS , 0 ) ;
49
+ assert . notEqual ( config . clientFlags & common . ClientConstants . CLIENT_IGNORE_SPACE , 0 ) ;
50
+ } ,
51
+
46
52
'ignores unknown client flags' : function ( ) {
47
53
var config1 = new ConnectionConfig ( { } ) ;
48
54
var config2 = new ConnectionConfig ( { flags : '+HAPPY_MYSQL' } ) ;
49
55
assert . equal ( config1 . clientFlags , config2 . clientFlags ) ;
50
56
} ,
51
57
58
+ 'ignores empty client flags' : function ( ) {
59
+ var config = new ConnectionConfig ( { flags : '-FOUND_ROWS,,+IGNORE_SPACE' } ) ;
60
+ assert . equal ( config . clientFlags & common . ClientConstants . CLIENT_FOUND_ROWS , 0 ) ;
61
+ assert . notEqual ( config . clientFlags & common . ClientConstants . CLIENT_IGNORE_SPACE , 0 ) ;
62
+ } ,
63
+
52
64
'blacklists unsupported client flags' : function ( ) {
53
65
var config = new ConnectionConfig ( { flags : '+CONNECT_ATTRS' } ) ;
54
66
assert . equal ( config . clientFlags & common . ClientConstants . CLIENT_CONNECT_ATTRS , 0 ) ;
You can’t perform that action at this time.
0 commit comments