diff options
author | John Molakvoæ <skjnldsv@users.noreply.github.com> | 2021-10-22 11:42:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-22 11:42:30 +0200 |
commit | 0a359376628b36256aa8332d79b1af1dfc513ce8 (patch) | |
tree | bc200632f14ebe2c6bfb4ec31dabee8c4fe1b49c /tests | |
parent | aef40c7cf485c48c7c9e8af96c419264cc5c5a10 (diff) | |
parent | d58d6199d980ce234b04aa2e892061d622507b5b (diff) | |
download | nextcloud-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.php | 27 |
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'], ]; } |