From 78ce69502526c4dda4a48da3bd8b2bbd8835022d Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Sun, 3 Dec 2017 14:28:13 +0000 Subject: [PATCH] Fixed tests for Windows --- tests/bug00799.phpt | 4 ++-- tests/bug01272-2.phpt | 2 ++ tests/bug01323-1.phpt | 19 +++++-------------- tests/remote_log-win.phpt | 2 ++ tests/xdebug_var_dump_fileformat-ansi.phpt | 6 +++--- tests/xdebug_var_dump_fileformat-html.phpt | 4 ++-- tests/xdebug_var_dump_fileformat-text.phpt | 6 +++--- usefulstuff.c | 3 --- 8 files changed, 19 insertions(+), 27 deletions(-) diff --git a/tests/bug00799.phpt b/tests/bug00799.phpt index d095056fa..fde02696c 100644 --- a/tests/bug00799.phpt +++ b/tests/bug00799.phpt @@ -45,7 +45,7 @@ unlink($tf); --EXPECTF-- A Test TRACE START [%d-%d-%d %d:%d:%d] -%w%f %w%d -> B->bar() %stests/bug00799.php:22 -%w%f %w%d -> xdebug_stop_trace() %stests/bug00799.php:24 +%w%f %w%d -> B->bar() %sbug00799.php:22 +%w%f %w%d -> xdebug_stop_trace() %sbug00799.php:24 %w%f %w%d TRACE END [%d-%d-%d %d:%d:%d] diff --git a/tests/bug01272-2.phpt b/tests/bug01272-2.phpt index d414ad7c1..f83276b38 100644 --- a/tests/bug01272-2.phpt +++ b/tests/bug01272-2.phpt @@ -1,5 +1,7 @@ --TEST-- Test for bug #1272: property_get doesn't return attributes for SimpleXMLElement +--SKIPIF-- + --FILE-- ( ! ) Notice: Undefined variable: i in %sbug01323-1.php on line 15 Call Stack #TimeMemoryFunctionLocation -1%f%d{main}( ).../bug01323-1.php:0 +1%f%d{main}( )...%ebug01323-1.php:0
@@ -45,7 +44,7 @@ foreach ( $formats as $format ) ( ! ) Notice: Undefined variable: i in %sbug01323-1.php on line 15 Call Stack #TimeMemoryFunctionLocation -1%f%d{main}( )tests/bug01323-1.php:0 +1%f%d{main}( )tests%ebug01323-1.php:0
@@ -53,7 +52,7 @@ foreach ( $formats as $format ) ( ! ) Notice: Undefined variable: i in %sbug01323-1.php on line 15 Call Stack #TimeMemoryFunctionLocation -1%f%d{main}( )%s/tests/bug01323-1.php:0 +1%f%d{main}( )%s%etests%ebug01323-1.php:0
@@ -61,7 +60,7 @@ foreach ( $formats as $format ) ( ! ) Notice: Undefined variable: i in %sbug01323-1.php on line 15 Call Stack #TimeMemoryFunctionLocation -1%f%d{main}( )%r(\/|\w:)%r%s/tests/bug01323-1.php:0 +1%f%d{main}( )%r(\/|\w:)%r%s%etests%ebug01323-1.php:0
@@ -69,13 +68,5 @@ foreach ( $formats as $format ) ( ! ) Notice: Undefined variable: i in %sbug01323-1.php on line 15 Call Stack #TimeMemoryFunctionLocation -1%f%d{main}( ):0 - - -
- - - - - +
( ! ) Notice: Undefined variable: i in %sbug01323-1.php on line 15
Call Stack
#TimeMemoryFunctionLocation
1%f%d{main}( ).../bug01323-1.php:0
1%f%d{main}( )...%ebug01323-1.php:0
diff --git a/tests/remote_log-win.phpt b/tests/remote_log-win.phpt index 847150b0f..0e743058b 100644 --- a/tests/remote_log-win.phpt +++ b/tests/remote_log-win.phpt @@ -24,6 +24,7 @@ Log opened at %d-%d-%d %d:%d:%d I: Checking remote connect back address. I: Checking user configured header 'I_LIKE_COOKIES'. I: Remote address found, connecting to doesnotexist3:9003. +W: Creating socket for 'doesnotexist3:9003', getaddrinfo: %d. E: Could not connect to client. :-( Log closed at %d-%d-%d %d:%d:%d @@ -31,5 +32,6 @@ Log opened at %d-%d-%d %d:%d:%d I: Checking remote connect back address. I: Checking user configured header 'I_LIKE_COOKIES'. I: Remote address found, connecting to doesnotexist3:9003. +W: Creating socket for 'doesnotexist3:9003', getaddrinfo: %d. E: Could not connect to client. :-( Log closed at %d-%d-%d %d:%d:%d diff --git a/tests/xdebug_var_dump_fileformat-ansi.phpt b/tests/xdebug_var_dump_fileformat-ansi.phpt index 7e78ffb69..5c95e4c9f 100644 --- a/tests/xdebug_var_dump_fileformat-ansi.phpt +++ b/tests/xdebug_var_dump_fileformat-ansi.phpt @@ -45,19 +45,19 @@ echo "\n"; int(1092515106) } -…/tests/xdebug_var_dump_fileformat-ansi.php:17: +…%etests%exdebug_var_dump_fileformat-ansi.php:17: class TimeStuff#%d (1) { private $timestamp => int(1092515106) } -«%s/tests/xdebug_var_dump_fileformat-ansi.php»:21: +«%s%etests%exdebug_var_dump_fileformat-ansi.php»:21: class TimeStuff#%d (1) { private $timestamp => int(1092515106) } -{%s/tests/xdebug_var_dump_fileformat-ansi.php}:25: +{%s%etests%exdebug_var_dump_fileformat-ansi.php}:25: class TimeStuff#%d (1) { private $timestamp => int(1092515106) diff --git a/tests/xdebug_var_dump_fileformat-html.phpt b/tests/xdebug_var_dump_fileformat-html.phpt index af29f02d3..21e299157 100644 --- a/tests/xdebug_var_dump_fileformat-html.phpt +++ b/tests/xdebug_var_dump_fileformat-html.phpt @@ -44,12 +44,12 @@ echo "\n"; private 'timestamp' => int 1092515106
-…/tests/xdebug_var_dump_fileformat-html.php:%d:
+…%etests%exdebug_var_dump_fileformat-html.php:%d:
 object(TimeStuff)[1]
   private 'timestamp' => int 1092515106
 
-«%s/tests/xdebug_var_dump_fileformat-html.php»:%d:
+«%s%etests%exdebug_var_dump_fileformat-html.php»:%d:
 object(TimeStuff)[1]
   private 'timestamp' => int 1092515106
 
diff --git a/tests/xdebug_var_dump_fileformat-text.phpt b/tests/xdebug_var_dump_fileformat-text.phpt index c3f92e605..f27164570 100644 --- a/tests/xdebug_var_dump_fileformat-text.phpt +++ b/tests/xdebug_var_dump_fileformat-text.phpt @@ -45,19 +45,19 @@ class TimeStuff#%d (%d) { int(1092515106) } -…/tests/xdebug_var_dump_fileformat-text.php:17: +…%etests%exdebug_var_dump_fileformat-text.php:17: class TimeStuff#%d (%d) { private $timestamp => int(1092515106) } -«%s/tests/xdebug_var_dump_fileformat-text.php»:21: +«%s%etests%exdebug_var_dump_fileformat-text.php»:21: class TimeStuff#%d (%d) { private $timestamp => int(1092515106) } -{%s/tests/xdebug_var_dump_fileformat-text.php}:25: +{%s%etests%exdebug_var_dump_fileformat-text.php}:25: class TimeStuff#%d (%d) { private $timestamp => int(1092515106) diff --git a/usefulstuff.c b/usefulstuff.c index f983a50a5..636dfaf0c 100644 --- a/usefulstuff.c +++ b/usefulstuff.c @@ -728,9 +728,6 @@ int xdebug_format_filename(char **formatted_name, const char *fmt, const char *d xdebug_join(slash, parts, parts->c - 3, parts->c - 1) : xdstrdup(parent); - /* Make sure that we at least output an empty string */ - xdebug_str_addl(&fname, "", 0, 0); - while (*format) { if (*format != '%') {