Skip to content

Commit 6b87e08

Browse files
committed
Fix tests for stat rdev
If HAVE_STRUCT_STAT_ST_RDEV is not set, rdev will be -1. %d only matches a natural number, we should let it match negative numbers too.
1 parent 41a3573 commit 6b87e08

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

ext/standard/tests/file/lstat_stat_variation18.phpt

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ array(26) {
8888
["gid"]=>
8989
int(%d)
9090
["rdev"]=>
91-
int(%d)
91+
int(%i)
9292
["size"]=>
9393
int(%d)
9494
["atime"]=>
@@ -144,7 +144,7 @@ array(26) {
144144
["gid"]=>
145145
int(%d)
146146
["rdev"]=>
147-
int(%d)
147+
int(%i)
148148
["size"]=>
149149
int(%d)
150150
["atime"]=>

ext/standard/tests/file/lstat_stat_variation19.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ array(26) {
8989
["gid"]=>
9090
int(%d)
9191
["rdev"]=>
92-
int(%d)
92+
int(%i)
9393
["size"]=>
9494
int(%d)
9595
["atime"]=>
@@ -143,7 +143,7 @@ array(26) {
143143
["gid"]=>
144144
int(%d)
145145
["rdev"]=>
146-
int(%d)
146+
int(%i)
147147
["size"]=>
148148
int(%d)
149149
["atime"]=>
@@ -199,7 +199,7 @@ array(26) {
199199
["gid"]=>
200200
int(%d)
201201
["rdev"]=>
202-
int(%d)
202+
int(%i)
203203
["size"]=>
204204
int(%d)
205205
["atime"]=>
@@ -253,7 +253,7 @@ array(26) {
253253
["gid"]=>
254254
int(%d)
255255
["rdev"]=>
256-
int(%d)
256+
int(%i)
257257
["size"]=>
258258
int(%d)
259259
["atime"]=>

ext/standard/tests/file/lstat_stat_variation20.phpt

+4-4
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ array(26) {
9898
["gid"]=>
9999
int(%d)
100100
["rdev"]=>
101-
int(%d)
101+
int(%i)
102102
["size"]=>
103103
int(%d)
104104
["atime"]=>
@@ -154,7 +154,7 @@ array(26) {
154154
["gid"]=>
155155
int(%d)
156156
["rdev"]=>
157-
int(%d)
157+
int(%i)
158158
["size"]=>
159159
int(%d)
160160
["atime"]=>
@@ -208,7 +208,7 @@ array(26) {
208208
["gid"]=>
209209
int(%d)
210210
["rdev"]=>
211-
int(%d)
211+
int(%i)
212212
["size"]=>
213213
int(%d)
214214
["atime"]=>
@@ -262,7 +262,7 @@ array(26) {
262262
["gid"]=>
263263
int(%d)
264264
["rdev"]=>
265-
int(%d)
265+
int(%i)
266266
["size"]=>
267267
int(%d)
268268
["atime"]=>

0 commit comments

Comments
 (0)