Skip to content

Commit

Permalink
Fixed tests for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
derickr committed Dec 3, 2017
1 parent 16bcaa2 commit 78ce695
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 27 deletions.
4 changes: 2 additions & 2 deletions tests/bug00799.phpt
Expand Up @@ -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]
2 changes: 2 additions & 0 deletions tests/bug01272-2.phpt
@@ -1,5 +1,7 @@
--TEST--
Test for bug #1272: property_get doesn't return attributes for SimpleXMLElement
--SKIPIF--
<?php if (!extension_loaded('simplexml')) echo "skip The SimpleXML extension needs to be installed\n"; ?>
--FILE--
<?php
include dirname(__FILE__) . '/bug01272.inc';
Expand Down
19 changes: 5 additions & 14 deletions tests/bug01323-1.phpt
Expand Up @@ -12,7 +12,6 @@ $formats = [
'%p',
'%a',
'%f',
'%',
'',
];

Expand All @@ -29,7 +28,7 @@ foreach ( $formats as $format )
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>.../bug01323-1.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>...%ebug01323-1.php<b>:</b>0</td></tr>
</table></font>

<br />
Expand All @@ -45,37 +44,29 @@ foreach ( $formats as $format )
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>tests/bug01323-1.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>tests%ebug01323-1.php<b>:</b>0</td></tr>
</table></font>

<br />
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>%s/tests/bug01323-1.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>%s%etests%ebug01323-1.php<b>:</b>0</td></tr>
</table></font>

<br />
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>%r(\/|\w:)%r%s/tests/bug01323-1.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>%r(\/|\w:)%r%s%etests%ebug01323-1.php<b>:</b>0</td></tr>
</table></font>

<br />
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'><b>:</b>0</td></tr>
</table></font>

<br />
<font size='1'><table class='xdebug-error xe-notice' dir='ltr' border='1' cellspacing='0' cellpadding='1'>
<tr><th align='left' bgcolor='#f57900' colspan="5"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Notice: Undefined variable: i in %sbug01323-1.php on line <i>15</i></th></tr>
<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>
<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>.../bug01323-1.php<b>:</b>0</td></tr>
<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>%f</td><td bgcolor='#eeeeec' align='right'>%d</td><td bgcolor='#eeeeec'>{main}( )</td><td title='%sbug01323-1.php' bgcolor='#eeeeec'>...%ebug01323-1.php<b>:</b>0</td></tr>
</table></font>
2 changes: 2 additions & 0 deletions tests/remote_log-win.phpt
Expand Up @@ -24,12 +24,14 @@ 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

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
6 changes: 3 additions & 3 deletions tests/xdebug_var_dump_fileformat-ansi.phpt
Expand Up @@ -45,19 +45,19 @@ echo "\n";
int(1092515106)
}

[1m…/tests/xdebug_var_dump_fileformat-ansi.php[22m:[1m17[22m:
[1m…%etests%exdebug_var_dump_fileformat-ansi.php[22m:[1m17[22m:
class TimeStuff#%d (1) {
private $timestamp =>
int(1092515106)
}

[1m«%s/tests/xdebug_var_dump_fileformat-ansi.php»[22m:[1m21[22m:
[1m«%s%etests%exdebug_var_dump_fileformat-ansi.php»[22m:[1m21[22m:
class TimeStuff#%d (1) {
private $timestamp =>
int(1092515106)
}

[1m{%s/tests/xdebug_var_dump_fileformat-ansi.php}[22m:[1m25[22m:
[1m{%s%etests%exdebug_var_dump_fileformat-ansi.php}[22m:[1m25[22m:
class TimeStuff#%d (1) {
private $timestamp =>
int(1092515106)
Expand Down
4 changes: 2 additions & 2 deletions tests/xdebug_var_dump_fileformat-html.phpt
Expand Up @@ -44,12 +44,12 @@ echo "\n";
<i>private</i> 'timestamp' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>1092515106</font>
</pre>
<pre class='xdebug-var-dump' dir='ltr'>
<small>/tests/xdebug_var_dump_fileformat-html.php:%d:</small>
<small>%etests%exdebug_var_dump_fileformat-html.php:%d:</small>
<b>object</b>(<i>TimeStuff</i>)[<i>1</i>]
<i>private</i> 'timestamp' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>1092515106</font>
</pre>
<pre class='xdebug-var-dump' dir='ltr'>
<small>«%s/tests/xdebug_var_dump_fileformat-html.php»:%d:</small>
<small>«%s%etests%exdebug_var_dump_fileformat-html.php»:%d:</small>
<b>object</b>(<i>TimeStuff</i>)[<i>1</i>]
<i>private</i> 'timestamp' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>1092515106</font>
</pre>
Expand Down
6 changes: 3 additions & 3 deletions tests/xdebug_var_dump_fileformat-text.phpt
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions usefulstuff.c
Expand Up @@ -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 != '%') {
Expand Down

0 comments on commit 78ce695

Please sign in to comment.