diff --git a/test/tickets/LDEV4665.cfc b/test/tickets/LDEV4665.cfc new file mode 100644 index 0000000000..787d11befa --- /dev/null +++ b/test/tickets/LDEV4665.cfc @@ -0,0 +1,31 @@ +component extends="org.lucee.cfml.test.LuceeTestCase" skip=true { + + function beforeAll(){ + variables.qry = queryNew( + "id", + "cf_sql_varchar", + [ + ["01"], + ["002"], + ["0003"] + ] + ); + } + + function run( testResults , testBox ) { + describe( title="Testcase for LDEV-4665", body = function() { + + it(title = "Checking queryFilter() function", body = function( currentSpec ) { + var test = queryFilter(qry,(row) => true).columnData("id"); + expect( test[3] ).toBe( qry.id[3] ); + expect( test[3].len() ).toBe( qry.id[3].len() ); + }); + + it(title = "Checking queryFilter() with member function", body = function( currentSpec ) { + var test = qry.filter((row) => true).columnData("id"); + expect( test[3] ).toBe( qry.id[3] ); + expect( test[3].len() ).toBe( qry.id[3].len() ) + }); + }); + } +}