Skip to content

Commit 4b7cb26

Browse files
committed
main: convert win32_docref functions to a new fonction using new stream error API
1 parent e304912 commit 4b7cb26

11 files changed

Lines changed: 36 additions & 59 deletions

ext/phar/tests/phar_buildfromdirectory2-win.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ try {
1919
echo $e->getMessage() . "\n";
2020
}
2121
?>
22-
--EXPECTF--
23-
%s(24) "UnexpectedValueException"
24-
RecursiveDirectoryIterator::__construct(1): %s (code: 2)
22+
--EXPECT--
23+
string(24) "UnexpectedValueException"
24+
RecursiveDirectoryIterator::__construct(1): Failed to open directory: No such file or directory

ext/phar/tests/phar_gobyebye-win32.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,4 @@ bool(false)
4444
bool(false)
4545
bool(false)
4646

47-
Warning: opendir(foo/hi): %s (code: 3) in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
48-
4947
Warning: opendir(foo/hi): Failed to open directory: No such file or directory in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d

ext/standard/tests/dir/bug80960.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,8 @@ opendir("notexist?");
1111
opendir(str_pad("longname", PHP_MAXPATHLEN - strlen(getcwd()), "_"));
1212
?>
1313
--EXPECTF--
14-
Warning: opendir(notexist*): %s (code: 123) in %s on line %d
15-
1614
Warning: opendir(notexist*): Failed to open directory: No such file or directory in %s on line %d
1715

18-
Warning: opendir(notexist?): %s (code: 123) in %s on line %d
19-
2016
Warning: opendir(notexist?): Failed to open directory: No such file or directory in %s on line %d
2117

22-
Warning: opendir(longname%r_+%r): %s (code: 111) in %s on line %d
23-
2418
Warning: opendir(longname%r_+%r): Failed to open directory: Filename too long in %s on line %d

ext/standard/tests/dir/opendir_variation6-win32.phpt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,15 @@ rmdir($dir_path);
4646
-- Wildcard = '*' --
4747

4848
Warning: opendir(%s/opendir_var*): %s in %s on line %d
49-
50-
Warning: opendir(%s/opendir_var*): Failed to open directory: %s in %s on line %d
5149
bool(false)
5250

5351
Warning: opendir(%s/*): %s in %s on line %d
54-
55-
Warning: opendir(%s/*): Failed to open directory: %s in %s on line %d
5652
bool(false)
5753

5854
-- Wildcard = '?' --
5955

6056
Warning: opendir(%s/opendir_variation6/sub_dir?): %s in %s on line %d
61-
62-
Warning: opendir(%s/opendir_variation6/sub_dir?): Failed to open directory: %s in %s on line %d
6357
bool(false)
6458

65-
Warning: opendir(%s/opendir_variation6/sub?dir1): %s in %s on line %d
66-
6759
Warning: opendir(%s/opendir_variation6/sub?dir1): Failed to open directory: %s in %s on line %d
6860
bool(false)

ext/standard/tests/file/rename_variation11-win32.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,12 @@ bool(true)
8686

8787
-- Iteration 5 --
8888

89-
Warning: rename(%s\renameVar11\renameVar11Sub\..\\\renameVar11Sub\\..\\..\renameVar11Sub\renameMe.tmp,%s\renameVar11\renameVar11Sub\..\\\renameVar11Sub\\..\\..\renameVar11Sub\IwasRenamed.tmp): The system cannot find the path specified (code: 3) in %s on line %d
89+
Warning: rename(): The system cannot find the path specified (code: 3) in %s on line %d
9090
bool(false)
9191

9292
-- Iteration 6 --
9393

94-
Warning: rename(%s\renameVar11\renameVar11Sub\BADDIR\renameMe.tmp,%s\renameVar11\renameVar11Sub\BADDIR\IwasRenamed.tmp): The system cannot find the path specified (code: 3) in %s on line %d
94+
Warning: rename(): The system cannot find the path specified (code: 3) in %s on line %d
9595
bool(false)
9696

9797
-- Iteration 7 --
@@ -112,7 +112,7 @@ bool(true)
112112

113113
-- Iteration 11 --
114114

115-
Warning: rename(BADDIR\renameMe.tmp,BADDIR\IwasRenamed.tmp): The system cannot find the path specified (code: 3) in %s on line %d
115+
Warning: rename(): The system cannot find the path specified (code: 3) in %s on line %d
116116
bool(false)
117117

118118
-- Iteration 12 --

ext/standard/tests/file/rename_variation12-win32.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,12 @@ bool(true)
8383

8484
-- Iteration 5 --
8585

86-
Warning: rename(%s/renameVar12/renameVar12Sub/..///renameVar12Sub//..//../renameVar12Sub/renameMe.tmp,%s/renameVar12/renameVar12Sub/..///renameVar12Sub//..//../renameVar12Sub/IwasRenamed.tmp): The system cannot find the path specified (code: 3) in %s on line %d
86+
Warning: rename(): The system cannot find the path specified (code: 3) in %s on line %d
8787
bool(false)
8888

8989
-- Iteration 6 --
9090

91-
Warning: rename(%s/renameVar12/renameVar12Sub/BADDIR/renameMe.tmp,%s/renameVar12/renameVar12Sub/BADDIR/IwasRenamed.tmp): The system cannot find the path specified (code: 3) in %s on line %d
91+
Warning: rename(): The system cannot find the path specified (code: 3) in %s on line %d
9292
bool(false)
9393

9494
-- Iteration 7 --
@@ -109,7 +109,7 @@ bool(true)
109109

110110
-- Iteration 11 --
111111

112-
Warning: rename(BADDIR/renameMe.tmp,BADDIR/IwasRenamed.tmp): The system cannot find the path specified (code: 3) in %s on line %d
112+
Warning: rename(): The system cannot find the path specified (code: 3) in %s on line %d
113113
bool(false)
114114

115115
*** Done ***

ext/standard/tests/file/rename_variation13-win32.phpt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,26 +65,26 @@ rmdir($file_path);
6565
-- 0 testing '-1' integer --
6666
bool(true)
6767

68-
Warning: rename(-1,%safile.tmp): The system cannot find the file specified (code: 2) in %srename_variation13-win32.php on line %d
68+
Warning: rename(): The system cannot find the file specified (code: 2) in %srename_variation13-win32.php on line %d
6969
bool(false)
7070
-- 1 testing '1' boolean --
7171
bool(true)
7272

73-
Warning: rename(1,%safile.tmp): The system cannot find the file specified (code: 2) in %srename_variation13-win32.php on line %d
73+
Warning: rename(): The system cannot find the file specified (code: 2) in %srename_variation13-win32.php on line %d
7474
bool(false)
7575
-- 2 testing '' boolean --
7676

77-
Warning: rename(%safile.tmp,): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
77+
Warning: rename(): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
7878
bool(false)
7979

80-
Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
80+
Warning: rename(): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
8181
bool(false)
8282
-- 3 testing '' string --
8383

84-
Warning: rename(%safile.tmp,): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
84+
Warning: rename(): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
8585
bool(false)
8686

87-
Warning: rename(,%safile.tmp): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
87+
Warning: rename(): %r(Invalid argument|(The parameter is incorrect|The system cannot find the path specified) \(code: \d+\))%r in %srename_variation13-win32.php on line %d
8888
bool(false)
8989
-- 4 testing ' ' string --
9090

@@ -95,15 +95,15 @@ Warning: rename(%s): The filename, directory name, or volume label syntax is inc
9595
bool(false)
9696
-- 5 testing '/no/such/file/dir' string --
9797

98-
Warning: rename(%safile.tmp,/no/such/file/dir): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
98+
Warning: rename(): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
9999
bool(false)
100100

101-
Warning: rename(/no/such/file/dir,%safile.tmp): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
101+
Warning: rename(): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
102102
bool(false)
103103
-- 6 testing 'php/php' string --
104104

105-
Warning: rename(%safile.tmp,php/php): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
105+
Warning: rename(): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
106106
bool(false)
107107

108-
Warning: rename(php/php,%safile.tmp): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
108+
Warning: rename(): The system cannot find the path specified (code: 3) in %srename_variation13-win32.php on line %d
109109
bool(false)

ext/standard/tests/file/rename_variation3-win32.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ bool(true)
6464

6565
-- Renaming existing file to existing directory name --
6666

67-
Warning: rename(%s/rename_variation3.tmp,%s/rename_variation3_dir): Access is denied (code: 5) in %s on line %d
67+
Warning: rename(): Access is denied (code: 5) in %s on line %d
6868
bool(false)
6969
bool(true)
7070
bool(true)

ext/standard/tests/file/rename_variation8-win32.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ rmdir(__DIR__."/rename_basic_dir1");
4646
--EXPECTF--
4747
*** Testing rename() on non-existing file ***
4848

49-
Warning: rename(%s/non_existent_file.tmp,%s/rename_variation8_new.tmp): The system cannot find the file specified (code: 2) in %s on line %d
49+
Warning: rename(): The system cannot find the file specified (code: 2) in %s on line %d
5050
bool(false)
5151
bool(false)
5252
bool(false)
@@ -58,7 +58,7 @@ bool(true)
5858

5959
*** Testing rename() on non-existing directory ***
6060

61-
Warning: rename(%s/non_existent_dir,%s/rename_basic_dir2): The system cannot find the file specified (code: 2) in %s on line %d
61+
Warning: rename(): The system cannot find the file specified (code: 2) in %s on line %d
6262
bool(false)
6363
bool(false)
6464
bool(false)

ext/standard/tests/general_functions/bug44295-win.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ try {
2323
?>
2424
==DONE==
2525
<?php exit(0); ?>
26-
--EXPECTF--
26+
--EXPECT--
2727
before
28-
in catch: DirectoryIterator::__construct(c:\not\exists\here): %s (code: 3)
28+
in catch: DirectoryIterator::__construct(c:\not\exists\here): Failed to open directory: No such file or directory
2929
==DONE==

0 commit comments

Comments
 (0)