From 200b74d18892e07a6f47ea602110de7aaa21ff8d Mon Sep 17 00:00:00 2001 From: Zac Spitzer Date: Thu, 7 Nov 2024 13:22:05 +0100 Subject: [PATCH] improve test --- test/functions/ExpandPath.cfc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/test/functions/ExpandPath.cfc b/test/functions/ExpandPath.cfc index 3947056f0c..27d4801a95 100644 --- a/test/functions/ExpandPath.cfc +++ b/test/functions/ExpandPath.cfc @@ -76,23 +76,31 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="mappings" { } public void function testForDirectoryWinStyleWithPlaceholder(){ - var trgWin=expandPath("{temp-directory}/#createUniqueID()#\"); + var uid = createUniqueID(); + var trgWin=expandPath("{temp-directory}/#uid#\"); expect(right(trgWin,1)).toBe(sep, trgWin); + expect(trgWin).toInclude(uid); } public void function testForDirectoryUnixStyleWithPlaceholder(){ - var trgUnix=expandPath("{temp-directory}/#createUniqueID()#/"); + var uid = createUniqueID(); + var trgUnix=expandPath("{temp-directory}/#uid#/"); expect(right(trgUnix,1)).toBe(sep, trgUnix); + expect(trgWin).toInclude(uid); } public void function testForDirectoryWinStyle(){ - var trgWin=expandPath("#getTempDirectory()#/#createUniqueID()#\"); + var uid = createUniqueID(); + var trgWin=expandPath("#getTempDirectory()#/#uid#\"); expect(right(trgWin,1)).toBe(sep, trgWin); + expect(trgWin).toInclude(uid); } public void function testForDirectoryUnixStyle(){ - var trgUnix=expandPath("#getTempDirectory()#/#createUniqueID()#/"); + var uid = createUniqueID(); + var trgUnix=expandPath("#getTempDirectory()#/#uid#/"); expect(right(trgUnix,1)).toBe(sep, trgUnix); + expect(trgUnix).toInclude(uid); } }