File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,6 +327,46 @@ function testSets(){
327327 'values ' => array ('hel"lo ' ),
328328 )
329329 ));
330+
331+ # a `''` inside a string quoted with `'`
332+ $ tbl = $ this ->get_first_table ("CREATE TABLE foo (bar ENUM('hel''lo')) " );
333+ $ this ->assertEquals ($ tbl ['fields ' ], array (
334+ array (
335+ 'name ' => "bar " ,
336+ 'type ' => "ENUM " ,
337+ 'values ' => array ("hel'lo " ),
338+ )
339+ ));
340+
341+ # a `""` inside a string quoted with `"`
342+ $ tbl = $ this ->get_first_table ('CREATE TABLE foo (bar ENUM("hel""lo")) ' );
343+ $ this ->assertEquals ($ tbl ['fields ' ], array (
344+ array (
345+ 'name ' => "bar " ,
346+ 'type ' => "ENUM " ,
347+ 'values ' => array ('hel"lo ' ),
348+ )
349+ ));
350+
351+ # a `''` inside a string quoted with `"`
352+ $ tbl = $ this ->get_first_table ("CREATE TABLE foo (bar ENUM( \"hel''lo \")) " );
353+ $ this ->assertEquals ($ tbl ['fields ' ], array (
354+ array (
355+ 'name ' => "bar " ,
356+ 'type ' => "ENUM " ,
357+ 'values ' => array ("hel''lo " ),
358+ )
359+ ));
360+
361+ # a `""` inside a string quoted with `'`
362+ $ tbl = $ this ->get_first_table ('CREATE TABLE foo (bar ENUM( \'hel""lo \')) ' );
363+ $ this ->assertEquals ($ tbl ['fields ' ], array (
364+ array (
365+ 'name ' => "bar " ,
366+ 'type ' => "ENUM " ,
367+ 'values ' => array ('hel""lo ' ),
368+ )
369+ ));
330370 }
331371
332372
You can’t perform that action at this time.
0 commit comments