1--TEST--
2Test mkdir/rmdir CP1251 with zend.multibyte
3--INI--
4zend.multibyte=1
5zend.script_encoding=cp1251
6--SKIPIF--
7<?php
8include __DIR__ . DIRECTORY_SEPARATOR . "util.inc";
9
10skip_if_not_win();
11if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
12skip_if_no_required_exts("mbstring");
13
14?>
15--CONFLICTS--
16dir_cp1251
17--FILE--
18<?php
19/*
20#vim: set fileencoding=cp1251
21#vim: set encoding=cp1251
22*/
23
24include __DIR__ . DIRECTORY_SEPARATOR . "util.inc";
25
26$item = "������"; // cp1251 string
27$prefix = create_data("dir_cp1251", $item . "3");
28$path = $prefix . DIRECTORY_SEPARATOR . "${item}3";
29
30$subpath = $path . DIRECTORY_SEPARATOR . "${item}4";
31
32/* The mb dirname exists*/
33var_dump(file_exists($path));
34
35var_dump(mkdir($subpath));
36var_dump(file_exists($subpath));
37
38get_basename_with_cp($subpath, 65001);
39
40var_dump(rmdir($subpath));
41remove_data("dir_cp1251");
42
43?>
44===DONE===
45--EXPECTF--
46bool(true)
47bool(true)
48bool(true)
49Active code page: 65001
50getting basename of %s\привет3\привет4
51string(13) "привет4"
52bool(true)
53string(%d) "%s\привет3\привет4"
54Active code page: %d
55bool(true)
56===DONE===
57