diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-07-08 15:55:17 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2016-07-08 15:55:17 +0200 |
commit | c2d88a08b796ca19c8b5ec63bfd34ac32ead4208 (patch) | |
tree | f18e0ba4d05361456a6712378ccc0784620c1e9c /tests/lib/Files | |
parent | 48f9e4ed03f3148d62919a95496ee43164d3e707 (diff) | |
download | nextcloud-server-c2d88a08b796ca19c8b5ec63bfd34ac32ead4208.tar.gz nextcloud-server-c2d88a08b796ca19c8b5ec63bfd34ac32ead4208.zip |
Remove unneeded checks if it runs on a Windows machine
* the setup check is still there
Diffstat (limited to 'tests/lib/Files')
-rw-r--r-- | tests/lib/Files/FilesystemTest.php | 22 | ||||
-rw-r--r-- | tests/lib/Files/Storage/LocalTest.php | 8 | ||||
-rw-r--r-- | tests/lib/Files/Type/DetectionTest.php | 4 | ||||
-rw-r--r-- | tests/lib/Files/ViewTest.php | 8 |
4 files changed, 2 insertions, 40 deletions
diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index 76e3f471633..210ce4edc69 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -272,28 +272,6 @@ class FilesystemTest extends \Test\TestCase { $this->assertSame($expected, \OC\Files\Filesystem::isFileBlacklisted($path)); } - public function normalizePathWindowsAbsolutePathData() { - return array( - array('C:/', 'C:\\'), - array('C:/', 'C:\\', false), - array('C:/tests', 'C:\\tests'), - array('C:/tests', 'C:\\tests', false), - array('C:/tests', 'C:\\tests\\'), - array('C:/tests/', 'C:\\tests\\', false), - ); - } - - /** - * @dataProvider normalizePathWindowsAbsolutePathData - */ - public function testNormalizePathWindowsAbsolutePath($expected, $path, $stripTrailingSlash = true) { - if (!\OC_Util::runningOnWindows()) { - $this->markTestSkipped('This test is Windows only'); - } - - $this->assertEquals($expected, \OC\Files\Filesystem::normalizePath($path, $stripTrailingSlash, true)); - } - public function testNormalizePathUTF8() { if (!class_exists('Patchwork\PHP\Shim\Normalizer')) { $this->markTestSkipped('UTF8 normalizer Patchwork was not found'); diff --git a/tests/lib/Files/Storage/LocalTest.php b/tests/lib/Files/Storage/LocalTest.php index cca4d6a6676..89dd2f0786f 100644 --- a/tests/lib/Files/Storage/LocalTest.php +++ b/tests/lib/Files/Storage/LocalTest.php @@ -48,10 +48,6 @@ class LocalTest extends Storage { } public function testStableEtag() { - if (\OC_Util::runningOnWindows()) { - $this->markTestSkipped('[Windows] On Windows platform we have no stable etag generation - yet'); - } - $this->instance->file_put_contents('test.txt', 'foobar'); $etag1 = $this->instance->getETag('test.txt'); $etag2 = $this->instance->getETag('test.txt'); @@ -59,10 +55,6 @@ class LocalTest extends Storage { } public function testEtagChange() { - if (\OC_Util::runningOnWindows()) { - $this->markTestSkipped('[Windows] On Windows platform we have no stable etag generation - yet'); - } - $this->instance->file_put_contents('test.txt', 'foo'); $this->instance->touch('test.txt', time() - 2); $etag1 = $this->instance->getETag('test.txt'); diff --git a/tests/lib/Files/Type/DetectionTest.php b/tests/lib/Files/Type/DetectionTest.php index 5800f4eb8e3..7b9dc1b3e4d 100644 --- a/tests/lib/Files/Type/DetectionTest.php +++ b/tests/lib/Files/Type/DetectionTest.php @@ -80,10 +80,6 @@ class DetectionTest extends \Test\TestCase { } public function testDetectString() { - if (\OC_Util::runningOnWindows()) { - $this->markTestSkipped('[Windows] Strings have mimetype application/octet-stream on Windows'); - } - $result = $this->detection->detectString("/data/data.tar.gz"); $expected = 'text/plain; charset=us-ascii'; $this->assertEquals($expected, $result); diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index 87feb63888d..72a91614100 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -104,7 +104,7 @@ class ViewTest extends \Test\TestCase { $cache->clear(); } - if ($this->tempStorage && !\OC_Util::runningOnWindows()) { + if ($this->tempStorage) { system('rm -rf ' . escapeshellarg($this->tempStorage->getDataDir())); } @@ -761,14 +761,10 @@ class ViewTest extends \Test\TestCase { /* * 4096 is the maximum path length in file_cache.path in *nix * 1024 is the max path length in mac - * 228 is the max path length in windows */ $folderName = 'abcdefghijklmnopqrstuvwxyz012345678901234567890123456789'; $tmpdirLength = strlen(\OC::$server->getTempManager()->getTemporaryFolder()); - if (\OC_Util::runningOnWindows()) { - $this->markTestSkipped('[Windows] '); - $depth = ((260 - $tmpdirLength) / 57); - } elseif (\OC_Util::runningOnMac()) { + if (\OC_Util::runningOnMac()) { $depth = ((1024 - $tmpdirLength) / 57); } else { $depth = ((4000 - $tmpdirLength) / 57); |