Skip to content

Commit 2f70038

Browse files
committed
Make more tests run on Linux
1 parent 3748d80 commit 2f70038

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+103
-386
lines changed

ext/curl/tests/bug48203-win32.phpt

Lines changed: 0 additions & 37 deletions
This file was deleted.

ext/curl/tests/bug48203.phpt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22
Bug #48203 (Crash when CURLOPT_STDERR is set to regular file)
33
--SKIPIF--
44
<?php include 'skipif.inc'; ?>
5-
<?php
6-
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
7-
die('skip now for Windows');
8-
}
9-
?>
105
--FILE--
116
<?php
127
include 'server.inc';
@@ -29,6 +24,9 @@ echo "Ok\n";
2924
--CLEAN--
3025
<?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?>
3126
--EXPECTF--
32-
Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203.php on line %d
27+
Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s on line %d
3328
%A
29+
Hello World!
30+
Hello World!* Closing connection 0
3431
Ok
32+

ext/curl/tests/bug54798-win32.phpt renamed to ext/curl/tests/bug54798-unix.phpt

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ Bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed before calling c
33
--SKIPIF--
44
<?php
55
include 'skipif.inc';
6-
if(substr(PHP_OS, 0, 3) != 'WIN' ) {
7-
die('skip Windows only');
6+
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
7+
die('skip not for Windows');
88
}
99
?>
1010
--FILE--
@@ -56,12 +56,9 @@ foreach($options_to_check as $option) {
5656
--CLEAN--
5757
<?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ?>
5858
--EXPECTF--
59-
%AOk for CURLOPT_STDERR
60-
61-
%AOk for CURLOPT_WRITEHEADER
62-
63-
%AHello World!
64-
Hello World!Ok for CURLOPT_FILE
65-
66-
%AOk for CURLOPT_INFILE
59+
%a
60+
%aOk for CURLOPT_STDERR
61+
%aOk for CURLOPT_WRITEHEADER
62+
%aOk for CURLOPT_FILE
63+
%aOk for CURLOPT_INFILE
6764
===DONE===

ext/curl/tests/bug54798.phpt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ Bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed before calling c
33
--SKIPIF--
44
<?php
55
include 'skipif.inc';
6-
if(substr(PHP_OS, 0, 3) == 'WIN' ) {
7-
die('skip not for Windows');
8-
}
96
?>
107
--FILE--
118
<?php
@@ -56,9 +53,12 @@ foreach($options_to_check as $option) {
5653
--CLEAN--
5754
<?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ?>
5855
--EXPECTF--
59-
%a
60-
%aOk for CURLOPT_STDERR
61-
%aOk for CURLOPT_WRITEHEADER
62-
%aOk for CURLOPT_FILE
63-
%aOk for CURLOPT_INFILE
56+
%AOk for CURLOPT_STDERR
57+
58+
%AOk for CURLOPT_WRITEHEADER
59+
60+
%AHello World!
61+
Hello World!Ok for CURLOPT_FILE
62+
63+
%AOk for CURLOPT_INFILE
6464
===DONE===

ext/curl/tests/bug61948-unix.phpt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--TEST--
2+
Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
3+
--SKIPIF--
4+
<?php if (!extension_loaded("curl")) print "skip";
5+
if(substr(PHP_OS, 0, 3) == 'WIN' )
6+
die("skip Not Valid for Windows");
7+
?>
8+
--INI--
9+
open_basedir="/tmp"
10+
--FILE--
11+
<?php
12+
$ch = curl_init();
13+
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
14+
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/foo"));
15+
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/xxx/bar"));
16+
curl_close($ch);
17+
?>
18+
--EXPECTF--
19+
bool(true)
20+
bool(true)
21+
22+
Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowed path(s): (/tmp) in %sbug61948-unix.php on line %d
23+
bool(false)

ext/curl/tests/bug61948-win32.phpt

Lines changed: 0 additions & 32 deletions
This file was deleted.

ext/curl/tests/bug61948.phpt

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,30 @@
11
--TEST--
22
Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
33
--SKIPIF--
4-
<?php if (!extension_loaded("curl")) print "skip";
5-
if(substr(PHP_OS, 0, 3) == 'WIN' )
6-
die("skip Not Valid for Windows");
4+
<?php if (!extension_loaded("curl")) print "skip curl extension not loaded";
75
?>
8-
--INI--
9-
open_basedir="/tmp"
106
--FILE--
117
<?php
8+
$base_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug61948";
9+
mkdir($base_dir . DIRECTORY_SEPARATOR . "foo", 0755, true);
10+
11+
ini_set("open_basedir", $base_dir);
12+
1213
$ch = curl_init();
1314
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
14-
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/foo"));
15-
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/xxx/bar"));
15+
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "$base_dir/foo"));
16+
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/xxx/bar"));
1617
curl_close($ch);
1718
?>
19+
--CLEAN--
20+
<?php
21+
$base_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug61948";
22+
rmdir("$base_dir/foo");
23+
rmdir($base_dir);
24+
?>
1825
--EXPECTF--
19-
bool(true)
26+
%a
2027
bool(true)
2128

22-
Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowed path(s): (/tmp) in %sbug61948.php on line %d
29+
Warning: curl_setopt(): open_basedir restriction in effect. File(c:/xxx/bar) is not within the allowed path(s): (%sbug61948) in %sbug61948.php on line %d
2330
bool(false)

ext/date/tests/date_default_timezone_get-1-win32.phpt

Lines changed: 0 additions & 21 deletions
This file was deleted.

ext/date/tests/gmstrftime_variation11.phpt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
2-
Test gmstrftime() function : usage variation - Checking month related formats which was not supported on Windows before VC14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
2+
Test gmstrftime() function : usage variation - Checking month related formats which was not supported on Windows before VC14.
93
--FILE--
104
<?php
115
/* Prototype : string gmstrftime(string format [, int timestamp])

ext/date/tests/gmstrftime_variation13.phpt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
2-
Test gmstrftime() function : usage variation - Checking date related formats which was not supported on Windows before VC14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
2+
Test gmstrftime() function : usage variation - Checking date related formats which was not supported on Windows before VC14.
93
--FILE--
104
<?php
115
/* Prototype : string gmstrftime(string format [, int timestamp])

ext/date/tests/gmstrftime_variation15.phpt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
2-
Test gmstrftime() function : usage variation - Checking time related formats which was not supported on Windows before VC14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
2+
Test gmstrftime() function : usage variation - Checking time related formats which was not supported on Windows before VC14.
93
--FILE--
104
<?php
115
/* Prototype : string gmstrftime(string format [, int timestamp])

ext/date/tests/gmstrftime_variation17.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test gmstrftime() function : usage variation - Checking day related formats which was not supported on Windows before vc14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* Prototype : string gmstrftime(string format [, int timestamp])

ext/date/tests/gmstrftime_variation19.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test gmstrftime() function : usage variation - Checking newline and tab formats which was not supported on Windows before VC14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* Prototype : string gmstrftime(string format [, int timestamp])

ext/date/tests/gmstrftime_variation21.phpt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
2-
Test gmstrftime() function : usage variation - Checking Preferred date and time representation on Windows.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
2+
Test gmstrftime() function : usage variation - Checking Preferred date and time representation on Windows.
93
--FILE--
104
<?php
115
/* Prototype : string gmstrftime(string format [, int timestamp])

ext/date/tests/gmstrftime_variation9.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test gmstrftime() function : usage variation - Checking week related formats which was not supported on Windows before vc14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is only valid for Windows");
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* Prototype : string gmstrftime(string format [, int timestamp])

ext/date/tests/strftime_variation11.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test strftime() function : usage variation - Checking month related formats which was not supported on Windows before VC14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* Prototype : string strftime(string format [, int timestamp])

ext/date/tests/strftime_variation13.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test strftime() function : usage variation - Checking date related formats which was not supported on Windows before VC14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* Prototype : string strftime(string format [, int timestamp])

ext/date/tests/strftime_variation15.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test strftime() function : usage variation - Checking time related formats which was not supported on Windows before VC14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* Prototype : string strftime(string format [, int timestamp])

ext/date/tests/strftime_variation17.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test strftime() function : usage variation - Checking day related formats which was not supported on Windows before VC14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* Prototype : string strftime(string format [, int timestamp])

ext/date/tests/strftime_variation19.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test strftime() function : usage variation - Checking newline and tab formats which was not supported on Windows before VC14.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* Prototype : string strftime(string format [, int timestamp])

ext/date/tests/strftime_variation21.phpt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
--TEST--
22
Test strftime() function : usage variation - Checking Preferred date and time representation on Windows.
3-
--SKIPIF--
4-
<?php
5-
if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
6-
die("skip Test is valid for Windows");
7-
}
8-
?>
93
--FILE--
104
<?php
115
/* Prototype : string strftime(string format [, int timestamp])

0 commit comments

Comments
 (0)