summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-17 23:50:16 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-03-17 23:50:16 +0100
commitc69cd28a734de8dd974223da4e9ff652b4baca46 (patch)
tree0dd1e46e0060af488c91142467823a3876387ebf /tests
parenta4d2c7810e0e11840f60211c8c87ae4443791e11 (diff)
parentf13216d275fc59d448e91aab5e817bff5627d3d9 (diff)
downloadnextcloud-server-c69cd28a734de8dd974223da4e9ff652b4baca46.tar.gz
nextcloud-server-c69cd28a734de8dd974223da4e9ff652b4baca46.zip
Merge pull request #14968 from owncloud/files-reallowsinglequote
Reallow single quote in file names
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/files/pathverificationtest.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/lib/files/pathverificationtest.php b/tests/lib/files/pathverificationtest.php
index 5d38c6291a6..65342c7799e 100644
--- a/tests/lib/files/pathverificationtest.php
+++ b/tests/lib/files/pathverificationtest.php
@@ -230,4 +230,30 @@ class PathVerification extends \Test\TestCase {
];
}
+ /**
+ * @dataProvider providesValidPosixPaths
+ */
+ public function testPathVerificationValidPaths($fileName) {
+ $storage = new Local(['datadir' => '']);
+
+ \Test_Helper::invokePrivate($storage, 'verifyPosixPath', [$fileName]);
+ \Test_Helper::invokePrivate($storage, 'verifyWindowsPath', [$fileName]);
+ // nothing thrown
+ $this->assertTrue(true);
+ }
+
+ public function providesValidPosixPaths() {
+ return [
+ ['simple'],
+ ['simple.txt'],
+ ['\''],
+ ['`'],
+ ['%'],
+ ['()'],
+ ['[]'],
+ ['!'],
+ ['$'],
+ ['_'],
+ ];
+ }
}