1--TEST--
2Test chdir()/getcwd() with a dir for multibyte filenames
3--SKIPIF--
4<?php
5
6include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc";
7
8
9skip_if_not_win();
10if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
11skip_if_no_required_exts();
12
13
14?>
15--FILE--
16<?php
17
18
19include dirname(__FILE__) . DIRECTORY_SEPARATOR . "util.inc";
20
21$prefix = create_data("dir_mb");
22$dirw = $prefix . DIRECTORY_SEPARATOR . "テストマルチバイト・パス42";
23touch($dirw . DIRECTORY_SEPARATOR . "dummy.txt");
24
25$old_cp = get_active_cp();
26set_active_cp(65001);
27
28$oldcwd = getcwd();
29var_dump(chdir($dirw));
30var_dump(getcwd());
31
32var_dump(file_exists("dummy.txt"));
33
34set_active_cp($old_cp);
35
36chdir($oldcwd);
37remove_data("dir_mb");
38
39?>
40===DONE===
41--EXPECTF--
42Active code page: 65001
43bool(true)
44string(%d) "%s\テストマルチバイト・パス42"
45bool(true)
46Active code page: %d
47===DONE===
48