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