1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 05:21:02 +02:00
Files
archived-php-src/ext/standard/tests/dir/getcwd_basic-win32-mb.phpt
Anatol Belski 596f488e06 Add skipifs to some mb path tests
These were invented primarily to test the multibyte path handling
patch on Windows. How it turns out by PR #2105, some test issues
on some filesystems are possible. Particularly HFS is configurable
to use different ways to save filenames, see
https://developer.apple.com/library/mac/qa/qa1173/_index.html
This makes it impossible to test the filenames byte wise, while
the results are still correct. There are still several other tests
using UTF-8 file names spread over other extensions. So far no
false positives are to see, they don't need to be touched.
2016-09-02 19:46:32 +02:00

41 lines
910 B
PHP

--TEST--
Test getcwd() function : basic functionality
--SKIPIF--
<?php
if (substr(PHP_OS, 0, 3) != 'WIN') {
die("skip Valid only on Windows");
}
?>
--FILE--
<?php
/* Prototype : mixed getcwd(void)
* Description: Gets the current directory
* Source code: ext/standard/dir.c
*/
/*
* Test basic functionality of getcwd()
*/
echo "*** Testing getcwd() : basic functionality ***\n";
//create temporary directory for test, removed in CLEAN section
$directory = dirname(__FILE__) . "/私はガラスを食べられますgetcwd_basic";
mkdir($directory);
var_dump(getcwd());
chdir($directory);
var_dump(getcwd());
?>
===DONE===
--CLEAN--
<?php
$directory = dirname(__FILE__) . "/私はガラスを食べられますgetcwd_basic";
rmdir($directory);
?>
--EXPECTF--
*** Testing getcwd() : basic functionality ***
string(%d) "%s"
string(%d) "%s%e私はガラスを食べられますgetcwd_basic"
===DONE===