diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-08-15 17:39:00 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-08-15 17:39:00 +0200 |
commit | 63af75586b53391670c2ccfb48d19f4b6950cab0 (patch) | |
tree | fa5a16539431673c9f51e54bb313ed69a30c60b6 /tests/lib/filesystem.php | |
parent | 4954e46bb2ba36c749b638111dc90500e12cedf7 (diff) | |
parent | dd3208fe6fadff3ad831df2fa5220e2184738b21 (diff) | |
download | nextcloud-server-63af75586b53391670c2ccfb48d19f4b6950cab0.tar.gz nextcloud-server-63af75586b53391670c2ccfb48d19f4b6950cab0.zip |
Merge branch 'master' into routing
Diffstat (limited to 'tests/lib/filesystem.php')
-rw-r--r-- | tests/lib/filesystem.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/lib/filesystem.php b/tests/lib/filesystem.php index 3e28d8c06e5..e041255ec91 100644 --- a/tests/lib/filesystem.php +++ b/tests/lib/filesystem.php @@ -59,6 +59,17 @@ class Test_Filesystem extends UnitTestCase{ $this->assertEqual('/',OC_Filesystem::getMountPoint('/some')); $this->assertEqual('folder',OC_Filesystem::getInternalPath('/some/folder')); } + + public function testNormalize(){ + $this->assertEqual('/path',OC_Filesystem::normalizePath('/path/')); + $this->assertEqual('/path',OC_Filesystem::normalizePath('path')); + $this->assertEqual('/path',OC_Filesystem::normalizePath('\path')); + $this->assertEqual('/foo/bar',OC_Filesystem::normalizePath('/foo//bar/')); + $this->assertEqual('/foo/bar',OC_Filesystem::normalizePath('/foo////bar')); + if(class_exists('Normalizer')){ + $this->assertEqual("/foo/bar\xC3\xBC",OC_Filesystem::normalizePath("/foo/baru\xCC\x88")); + } + } } ?>
\ No newline at end of file |