From 6b87e08b82d8c9c797ca4c4c5137d177e98eecd9 Mon Sep 17 00:00:00 2001 From: Niels Dossche <7771979+nielsdos@users.noreply.github.com> Date: Mon, 10 Jul 2023 21:58:22 +0200 Subject: [PATCH] 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. --- ext/standard/tests/file/lstat_stat_variation18.phpt | 4 ++-- ext/standard/tests/file/lstat_stat_variation19.phpt | 8 ++++---- ext/standard/tests/file/lstat_stat_variation20.phpt | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ext/standard/tests/file/lstat_stat_variation18.phpt b/ext/standard/tests/file/lstat_stat_variation18.phpt index d68fdb6c7bf89..e3c8386e70f1d 100644 --- a/ext/standard/tests/file/lstat_stat_variation18.phpt +++ b/ext/standard/tests/file/lstat_stat_variation18.phpt @@ -88,7 +88,7 @@ array(26) { ["gid"]=> int(%d) ["rdev"]=> - int(%d) + int(%i) ["size"]=> int(%d) ["atime"]=> @@ -144,7 +144,7 @@ array(26) { ["gid"]=> int(%d) ["rdev"]=> - int(%d) + int(%i) ["size"]=> int(%d) ["atime"]=> diff --git a/ext/standard/tests/file/lstat_stat_variation19.phpt b/ext/standard/tests/file/lstat_stat_variation19.phpt index d73fbcebf80a5..18ad03e52d29c 100644 --- a/ext/standard/tests/file/lstat_stat_variation19.phpt +++ b/ext/standard/tests/file/lstat_stat_variation19.phpt @@ -89,7 +89,7 @@ array(26) { ["gid"]=> int(%d) ["rdev"]=> - int(%d) + int(%i) ["size"]=> int(%d) ["atime"]=> @@ -143,7 +143,7 @@ array(26) { ["gid"]=> int(%d) ["rdev"]=> - int(%d) + int(%i) ["size"]=> int(%d) ["atime"]=> @@ -199,7 +199,7 @@ array(26) { ["gid"]=> int(%d) ["rdev"]=> - int(%d) + int(%i) ["size"]=> int(%d) ["atime"]=> @@ -253,7 +253,7 @@ array(26) { ["gid"]=> int(%d) ["rdev"]=> - int(%d) + int(%i) ["size"]=> int(%d) ["atime"]=> diff --git a/ext/standard/tests/file/lstat_stat_variation20.phpt b/ext/standard/tests/file/lstat_stat_variation20.phpt index f9feba40f0776..5bff0456eba5e 100644 --- a/ext/standard/tests/file/lstat_stat_variation20.phpt +++ b/ext/standard/tests/file/lstat_stat_variation20.phpt @@ -98,7 +98,7 @@ array(26) { ["gid"]=> int(%d) ["rdev"]=> - int(%d) + int(%i) ["size"]=> int(%d) ["atime"]=> @@ -154,7 +154,7 @@ array(26) { ["gid"]=> int(%d) ["rdev"]=> - int(%d) + int(%i) ["size"]=> int(%d) ["atime"]=> @@ -208,7 +208,7 @@ array(26) { ["gid"]=> int(%d) ["rdev"]=> - int(%d) + int(%i) ["size"]=> int(%d) ["atime"]=> @@ -262,7 +262,7 @@ array(26) { ["gid"]=> int(%d) ["rdev"]=> - int(%d) + int(%i) ["size"]=> int(%d) ["atime"]=>