<commit_before>component extends="org.lucee.cfml.test.LuceeTestCase" skip = true{
    function run( testResults,testBox ){
        describe("Testcase for LDEV-3873", function(){
            variables.qry = queryNew("id,name,num", "integer,varchar,integer", [[1,"foo",1],[2,"bar",2]]);
            it( title="queryExecute with \' in sql and positional params", body=function( currentSpec ){
                var posParam = queryExecute(sql="SELECT 'D:\test\' AS path, name FROM qry WHERE id = ? AND num = ?",
                    params=[1,1],
                    options={dbtype="query"}
                );
                expect(posparam.path).toBe("D:\test\");
                expect(posparam.name).toBe("foo");
                expect(posParam.getSql().toString()).toBe("SELECT 'D:\test\' AS path, name FROM qry WHERE id = '1' AND num = '1'");
            });
            it( title="queryExecute with \' in sql and named params", body=function( currentSpec ){
                var namedParam = queryExecute(sql="SELECT 'D:\test\' AS path, name FROM qry WHERE id = :id AND num = :num",
                    params={id:1,num:1},
                    options={dbtype="query"}
                );
                expect(namedParam.path).toBe("D:\test\");
                expect(namedParam.name).toBe("foo");
                expect(namedParam.getSql().toString()).toBe("SELECT 'D:\test\' AS path, name FROM qry WHERE id = '1' AND num = '1'");
            });
        });
    }
}<commit_msg>LDEV-3863 enabled test suite, add test case<commit_after>component extends="org.lucee.cfml.test.LuceeTestCase" {
    function run( testResults,testBox ){
        describe("Testcase for LDEV-3873", function(){
            variables.qry = queryNew("id,name,num", "integer,varchar,integer", [[1,"foo",1],[2,"bar",2]]);
            it( title="queryExecute with \' in sql and positional params", body=function( currentSpec ){
                var posParam = queryExecute(sql="SELECT 'D:\test\' AS path, name FROM qry WHERE id = ? AND num = ?",
                    params=[1,1],
                    options={dbtype="query"}
                );
                expect(posparam.path).toBe("D:\test\");
                expect(posparam.name).toBe("foo");
                expect(posParam.getSql().toString()).toBe("SELECT 'D:\test\' AS path, name FROM qry WHERE id = '1' AND num = '1'");
            });
            it( title="queryExecute with \' in sql and named params", body=function( currentSpec ){
                var namedParam = queryExecute(sql="SELECT 'D:\test\' AS path, name FROM qry WHERE id = :id AND num = :num",
                    params={id:1,num:1},
                    options={dbtype="query"}
                );
                expect(namedParam.path).toBe("D:\test\");
                expect(namedParam.name).toBe("foo");
                expect(namedParam.getSql().toString()).toBe("SELECT 'D:\test\' AS path, name FROM qry WHERE id = '1' AND num = '1'");
            });

            it( title="queryExecute with empty params struct", body=function( currentSpec ){
                var emptyParams = queryExecute(sql="SELECT name FROM qry",
                    params={},
                    options={dbtype="query"}
                );
                expect(emptyParams.recordcount).toBe(2);
            });
        });
    }
}
{'fraction_non_alphanumeric': 0.1567209162145871, 'fraction_numerical': 0.011151295961422544, 'mean_word_length': 2.011796733212341, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2728803', 'n_tokens_mistral': 938, 'n_tokens_neox': 890, 'n_words': 215}