Skip to content

Commit

Permalink
LDEV-5146 test case for expand path directory endings
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Nov 7, 2024
1 parent 716e098 commit 6c375bc
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions test/functions/ExpandPath.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,33 @@ component extends="org.lucee.cfml.test.LuceeTestCase" labels="mappings" {
expandPath( '/');
}



public void function testForDirectoryWinStyleWithPlaceholder(){
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 uid = createUniqueID();
var trgUnix=expandPath("{temp-directory}/#uid#/");
expect(right(trgUnix,1)).toBe(sep, trgUnix);
expect(trgWUnix).toInclude(uid);
}

public void function testForDirectoryWinStyle(){
var uid = createUniqueID();
var trgWin=expandPath("#getTempDirectory()#/#uid#\");
expect(right(trgWin,1)).toBe(sep, trgWin);
expect(trgWin).toInclude(uid);
}

public void function testForDirectoryUnixStyle(){
var uid = createUniqueID();
var trgUnix=expandPath("#getTempDirectory()#/#uid#/");
expect(right(trgUnix,1)).toBe(sep, trgUnix);
expect(trgUnix).toInclude(uid);
}

}
</cfscript>

0 comments on commit 6c375bc

Please sign in to comment.