From 80e5b65f32f2eb14ebcbcde7cd4dcd9da067957f Mon Sep 17 00:00:00 2001 From: michaeloffner Date: Fri, 18 Oct 2024 14:33:43 +0200 Subject: [PATCH] add test case --- test/general/String.cfc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 test/general/String.cfc diff --git a/test/general/String.cfc b/test/general/String.cfc new file mode 100644 index 0000000000..2e3cf408a6 --- /dev/null +++ b/test/general/String.cfc @@ -0,0 +1,17 @@ +component extends="org.lucee.cfml.test.LuceeTestCase"{ + function beforeAll(){} + + function afterAll(){} + + function run( testResults , testBox ) { + describe( "tests for the type string", function() { + + it(title="use the underlaying method", body=function(){ + var originalString = "My phone number is 123-456-7890."; + var regex = "\d"; + var replacedString = originalString.replaceAll(regex, "*"); + expect(replacedString).toBe("My phone number is ***-***-****."); + }); + }); + } +} \ No newline at end of file