xref: /PHP-7.4/ext/standard/tests/dir/bug80960.phpt (revision ea3c992b)
1--TEST--
2Fix #80960 (opendir() warning wrong info when failed on Windows)
3--SKIPIF--
4<?php
5if (PHP_OS_FAMILY !== "Windows") die("skip for Windows only");
6?>
7--INI--
8log_errors_max_len=0
9--FILE--
10<?php
11opendir("notexist*");
12opendir("notexist?");
13opendir(str_pad("longname", PHP_MAXPATHLEN - strlen(getcwd()), "_"));
14?>
15--EXPECTF--
16Warning: opendir(notexist*): %s (code: 123) in %s on line %d
17
18Warning: opendir(notexist*): failed to open dir: No such file or directory in %s on line %d
19
20Warning: opendir(notexist?): %s (code: 123) in %s on line %d
21
22Warning: opendir(notexist?): failed to open dir: No such file or directory in %s on line %d
23
24Warning: opendir(longname%r_+%r): %s (code: 111) in %s on line %d
25
26Warning: opendir(longname%r_+%r): failed to open dir: Filename too long in %s on line %d
27