From 66cf31c7e225870039fa59740b6a054aab150d7b Mon Sep 17 00:00:00 2001 From: CF Mitrah Date: Tue, 25 Jul 2023 21:13:57 +0530 Subject: [PATCH] Added a testcase for listQualifiedToArray() --- test/functions/listQualifiedToArray.cfc | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/functions/listQualifiedToArray.cfc diff --git a/test/functions/listQualifiedToArray.cfc b/test/functions/listQualifiedToArray.cfc new file mode 100644 index 0000000000..917babc4c5 --- /dev/null +++ b/test/functions/listQualifiedToArray.cfc @@ -0,0 +1,19 @@ +component extends = "org.lucee.cfml.test.LuceeTestCase" { + function run( testResults , testBox ) { + describe( "Testcase for listQualifiedToArray()", function() { + it(title = "Checking with listQualifiedToArray()", body = function( currentSpec ) { + var list = "I,love,lucee"; + arr = listQualifiedToArray(list); + expect(arr[1]).toBe("I"); + expect(arr.len()).toBe(3); + }); + it(title = "Checking with listQualifiedToArray()", body = function( currentSpec ) { + var list = "I'love,lucee"; + arr = listQualifiedToArray(list, "'"); + expect(arr[1]).toBe("I"); + expect(arr[2]).toBe("love,lucee"); + expect(arr.len()).toBe(2); + }); + }); + } +} \ No newline at end of file