summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
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'],
+ ['\''],
+ ['`'],
+ ['%'],
+ ['()'],
+ ['[]'],
+ ['!'],
+ ['$'],
+ ['_'],
+ ];
+ }
}