diff --git a/test/tickets/LDEV4866.cfc b/test/tickets/LDEV4866.cfc index b4ec1dc952..a34b4b6ae0 100644 --- a/test/tickets/LDEV4866.cfc +++ b/test/tickets/LDEV4866.cfc @@ -6,38 +6,36 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="query" { function run( testResults , testBox ) { describe( title='LDEV-4866' , body=function(){ it( title='test query parsing, /* */-' , body=function() { - ``` - -/* */- - ``` + doQuery("#chr(13)# /* */- "); + doQuery("#chr(13)# /* */- "); + doQuery("/* */-"); }); it( title='test query parsing, just a - whitespace' , body=function() { - ``` - - - - - ``` + doQuery("#chr(9)# - #chr(13)# "); }); it( title='test query parsing, just a -' , body=function() { - ``` - - - ``` + doQuery("-"); }); it( title='test query parsing, just a / whitespace' , body=function() { - ``` - - / - - ``` + doQuery("#chr(9)# / #chr(13)# "); }); it( title='test query parsing, just a /' , body=function() { - ``` - / - ``` + doQuery("/"); }); }); } + private function doQuery(sql){ + try { + query name="test" datasource="#ds#" params="#params#" { + echo( sql ); + } + } catch (e) { + if ( e.stackTrace.indexOf("lucee.runtime.exp.DatabaseException:") neq 0 ) + rethrow; + } + } + } \ No newline at end of file