summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMichael Gapczynski <mtgap@owncloud.com>2012-08-14 10:20:00 -0400
committerMichael Gapczynski <mtgap@owncloud.com>2012-08-14 10:22:13 -0400
commit4c7fd8cd0191871e48704f693f48554d4ee7a726 (patch)
treea66a930783de938deaa3d2362dcf779e5c2b45af /tests
parent64ef1e21819979d7fdc406d2628bc175b16fe554 (diff)
parent62e4f55f721971dacd06649cecefe0487626aa75 (diff)
downloadnextcloud-server-4c7fd8cd0191871e48704f693f48554d4ee7a726.tar.gz
nextcloud-server-4c7fd8cd0191871e48704f693f48554d4ee7a726.zip
Merge branch 'master' into share_api
Conflicts: lib/group.php lib/group/backend.php lib/group/database.php lib/group/interface.php lib/public/user.php lib/user.php lib/user/backend.php lib/user/database.php lib/user/interface.php
Diffstat (limited to 'tests')
-rw-r--r--tests/lib/filesystem.php11
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