📁 File Manager Pro
v10.0.3 | PHP: 8.2.31
Server: LiteSpeed
2026-07-03 21:35:34
📂
/ (Root)
/
home
/
orkouolp
/
web
/
testing.orkobd
/
laravel
/
vendor
/
nette
/
utils
/
tests
/
Utils
📍 /home/orkouolp/web/testing.orkobd/laravel/vendor/nette/utils/tests/Utils
🔄 Refresh
✏️
Editing: FileSystem.normalizePath.phpt
Writable
<?php declare(strict_types=1); use Nette\Utils\FileSystem; use Tester\Assert; require __DIR__ . '/../bootstrap.php'; test('', function () { $S = DIRECTORY_SEPARATOR; Assert::same('', FileSystem::normalizePath('')); Assert::same($S, FileSystem::normalizePath('\\')); Assert::same($S, FileSystem::normalizePath('/')); Assert::same('file', FileSystem::normalizePath('file')); Assert::same("file{$S}", FileSystem::normalizePath('file/')); Assert::same("d:{$S}file", FileSystem::normalizePath('d:/file')); Assert::same("d:{$S}file", FileSystem::normalizePath('d:\file')); Assert::same("{$S}file", FileSystem::normalizePath('/file')); Assert::same('', FileSystem::normalizePath('.')); Assert::same($S, FileSystem::normalizePath('\\.')); Assert::same($S, FileSystem::normalizePath('/.')); Assert::same($S, FileSystem::normalizePath('.\\')); Assert::same($S, FileSystem::normalizePath('./')); Assert::same($S, FileSystem::normalizePath('/file/..')); Assert::same($S, FileSystem::normalizePath('/file/../')); Assert::same('', FileSystem::normalizePath('file/..')); Assert::same($S, FileSystem::normalizePath('file/../')); Assert::same("{$S}..", FileSystem::normalizePath('/file/../..')); Assert::same("{$S}..{$S}", FileSystem::normalizePath('/file/../../')); Assert::same('..', FileSystem::normalizePath('file/../..')); Assert::same("..{$S}", FileSystem::normalizePath('file/../../')); Assert::same("{$S}..{$S}bar", FileSystem::normalizePath('/file/../../bar')); Assert::same("..{$S}bar", FileSystem::normalizePath('file/../../bar')); Assert::same("..{$S}file", FileSystem::normalizePath('../file')); Assert::same("{$S}..{$S}file", FileSystem::normalizePath('/../file')); Assert::same('file', FileSystem::normalizePath('./file')); Assert::same("{$S}file", FileSystem::normalizePath('/./file')); Assert::same("{$S}..{$S}bar", FileSystem::normalizePath('/file/./.././.././bar')); Assert::same("..{$S}bar", FileSystem::normalizePath('file/../../bar/.')); Assert::same("{$S}..{$S}bar{$S}", FileSystem::normalizePath('/file/./.././.././bar/')); Assert::same("..{$S}bar{$S}", FileSystem::normalizePath('file/../../bar/./')); Assert::same($S, FileSystem::normalizePath('//')); Assert::same("{$S}foo{$S}", FileSystem::normalizePath('//foo//')); Assert::same("{$S}", FileSystem::normalizePath('//foo//..//')); });
💾 Save Changes
❌ Cancel