Skip to content

Commit 86f0908

Browse files
committed
tests/functional: Add tests for builtins.dirOf
These will change in the next commit to fix the silent regression from 2.23 in the handling of multiple subsequent path separators.
1 parent 479b6b7 commit 86f0908

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ pathDoesntExistNested1 = /totallydoesntexistreally; pathDoesntExistNested2 = /totallydoesntexistreally/subdir1; pathDoesntExistRoot = /; pathRoot = /; stringEmpty = "."; stringMultipleSeps = "a"; stringNoSep = "."; stringRoot = "/"; stringRootA = "/"; stringRootSlash = "//"; stringRootSlashSlash = "///"; stringSingleDir = "a"; stringWithDot = "a/b/c/."; stringWithDotAndDotDot = "a/b/c/../."; stringWithDotAndDotDotSep2 = "a/b/c/../."; stringWithDotDot = "a/b/c/.."; stringWithDotDotSep2 = "a/b/c/.."; stringWithDotSep2 = "a/b/c/."; }
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
stringEmpty = dirOf "";
3+
stringNoSep = dirOf "filename";
4+
stringSingleDir = dirOf "a/b";
5+
stringMultipleSeps = dirOf "a///b";
6+
stringRoot = dirOf "/";
7+
stringRootSlash = dirOf "//";
8+
stringRootSlashSlash = dirOf "///";
9+
stringRootA = dirOf "/a";
10+
stringWithDot = dirOf "a/b/c/./d";
11+
stringWithDotSep2 = dirOf "a/b/c/.//d";
12+
stringWithDotDot = dirOf "a/b/c/../d";
13+
stringWithDotDotSep2 = dirOf "a/b/c/..//d";
14+
stringWithDotAndDotDot = dirOf "a/b/c/.././d";
15+
stringWithDotAndDotDotSep2 = dirOf "a/b/c/.././/d";
16+
17+
pathRoot = dirOf /.;
18+
pathDoesntExistRoot = dirOf /totallydoesntexistreally;
19+
pathDoesntExistNested1 = dirOf /totallydoesntexistreally/subdir1;
20+
pathDoesntExistNested2 = dirOf /totallydoesntexistreally/subdir1/subdir2;
21+
}

0 commit comments

Comments
 (0)