From dcf38d32db845a90d6ac8943772346191f83f91b Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Thu, 16 Jan 2025 13:31:30 +0530 Subject: [PATCH] Added a test case for LDEV-5254 --- test/tickets/LDEV5254.cfc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/tickets/LDEV5254.cfc diff --git a/test/tickets/LDEV5254.cfc b/test/tickets/LDEV5254.cfc new file mode 100644 index 0000000000..70bd3824e4 --- /dev/null +++ b/test/tickets/LDEV5254.cfc @@ -0,0 +1,20 @@ +component extends = "org.lucee.cfml.test.LuceeTestCase" { + function run( testResults, testBox ) { + describe( "test query duplicate for LDEV-5254 ", function() { + it( "test query duplicate", function() { + qry1 = querynew("a,b", "integer,integer"); + queryaddrow(qry1); + querysetcell(qry1, "a", 1); + querysetcell(qry1, "b", 2); + + qry2 = duplicate(qry1); + queryaddrow(qry2); + querysetcell(qry2, "a", 4); + querysetcell(qry2, "b", 5); + + expect( querycolumndata(qry2, "a").len() ).toBe( 2 ); + expect( querycolumndata(qry1, "a").len() ).toBe( 1 ); + }); + }); + } +} \ No newline at end of file