aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2021-10-22 11:42:30 +0200
committerGitHub <noreply@github.com>2021-10-22 11:42:30 +0200
commit0a359376628b36256aa8332d79b1af1dfc513ce8 (patch)
treebc200632f14ebe2c6bfb4ec31dabee8c4fe1b49c /tests
parentaef40c7cf485c48c7c9e8af96c419264cc5c5a10 (diff)
parentd58d6199d980ce234b04aa2e892061d622507b5b (diff)
downloadnextcloud-server-0a359376628b36256aa8332d79b1af1dfc513ce8.tar.gz
nextcloud-server-0a359376628b36256aa8332d79b1af1dfc513ce8.zip
Merge pull request #26347 from J0WI/clean-path-regex
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/Files/FilesystemTest.php27
1 files changed, 22 insertions, 5 deletions
diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php
index 5859bc2c772..8f34860d85a 100644
--- a/tests/lib/Files/FilesystemTest.php
+++ b/tests/lib/Files/FilesystemTest.php
@@ -140,11 +140,26 @@ class FilesystemTest extends \Test\TestCase {
['/foo/.bar', '/foo/.bar/'],
['/foo/.bar/', '/foo/.bar/', false],
['/foo/.bar/tee', '/foo/.bar/tee'],
-
- ['/foo/bar', '/.///././//./foo/.///././//./bar/./././.'],
- ['/foo/bar/', '/.///././//./foo/.///././//./bar/./././.', false],
- ['/foo/bar', '/.///././//./foo/.///././//./bar/././././'],
- ['/foo/bar/', '/.///././//./foo/.///././//./bar/././././', false],
+ ['/foo/bar.', '/foo/bar./'],
+ ['/foo/bar./', '/foo/bar./', false],
+ ['/foo/bar./tee', '/foo/bar./tee'],
+ ['/foo/.bar.', '/foo/.bar./'],
+ ['/foo/.bar./', '/foo/.bar./', false],
+ ['/foo/.bar./tee', '/foo/.bar./tee'],
+
+ ['/foo/bar', '/.////././//./foo/.///././//./bar/././/./.'],
+ ['/foo/bar/', '/.////././//./foo/.///././//./bar/./././.', false],
+ ['/foo/bar', '/.////././//./foo/.///././//./bar/././/././'],
+ ['/foo/bar/', '/.////././//./foo/.///././//./bar/././/././', false],
+ ['/foo/.bar', '/.////././//./foo/./././/./.bar/././/././'],
+ ['/foo/.bar/', '/.////././//./foo/./././/./.bar/././/././', false],
+ ['/foo/.bar/tee./', '/.////././//./foo/./././/./.bar/tee././/././', false],
+ ['/foo/bar.', '/.////././//./foo/./././/./bar./././/././'],
+ ['/foo/bar./', '/.////././//./foo/./././/./bar./././/././', false],
+ ['/foo/bar./tee./', '/.////././//./foo/./././/./bar./tee././/././', false],
+ ['/foo/.bar.', '/.////././//./foo/./././/./.bar./././/././'],
+ ['/foo/.bar./', '/.////././//./foo/./././/./.bar./././././', false],
+ ['/foo/.bar./tee./', '/.////././//./foo/./././/./.bar./tee././././', false],
// Windows paths
['/', ''],
@@ -186,7 +201,9 @@ class FilesystemTest extends \Test\TestCase {
// normalize does not resolve '..' (by design)
['/foo/..', '/foo/../'],
+ ['/foo/../bar', '/foo/../bar/.'],
['/foo/..', '\\foo\\..\\'],
+ ['/foo/../bar', '\\foo\\..\\bar'],
];
}