Skip to content

Commit f5e4771

Browse files
committed
Remove checks for always enabled spl and pcre
Closes GH-4397
1 parent 499f2ac commit f5e4771

File tree

4 files changed

+6
-29
lines changed

4 files changed

+6
-29
lines changed

ext/spl/tests/bug70868.phpt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Bug #70868, with PCRE JIT
33
--INI--
44
pcre.jit=1
5-
--SKIPIF--
6-
<?php if (!extension_loaded("pcre")) die("skip"); ?>
75
--FILE--
86
<?php
97

ext/standard/tests/general_functions/bug44295-win.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
user defined error handler + set_error_handling(EH_THROW)
33
--SKIPIF--
44
<?php
5-
if(substr(PHP_OS, 0, 3) != "WIN") die("skip Windows only");
6-
if (!extension_loaded("spl") || is_dir('c:\\not\\exists\\here')) die("skip");
5+
if (substr(PHP_OS, 0, 3) != "WIN") die("skip Windows only");
6+
if (is_dir('c:\\not\\exists\\here')) die("skip directory c:\\not\\exists\\here already exists");
77
?>
88
--FILE--
99
<?php

ext/standard/tests/general_functions/bug44295.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
user defined error handler + set_error_handling(EH_THROW)
33
--SKIPIF--
44
<?php
5-
if(substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows");
6-
if (!extension_loaded("spl") || is_dir('/this/path/does/not/exist')) die("skip");
5+
if (substr(PHP_OS, 0, 3) == "WIN") die("skip Not for Windows");
6+
if (is_dir('/this/path/does/not/exist')) die("skip directory /this/path/does/not/exist already exists");
77
?>
88
--FILE--
99
<?php

run-tests.php

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,6 @@ function main()
7474
}
7575
define('TEST_PHP_SRCDIR', getcwd());
7676

77-
78-
/* Sanity check to ensure that pcre extension needed by this script is available.
79-
* In the event it is not, print a nice error message indicating that this script will
80-
* not run without it.
81-
*/
82-
83-
if (!extension_loaded('pcre')) {
84-
echo <<<NO_PCRE_ERROR
85-
86-
+-----------------------------------------------------------+
87-
| ! ERROR ! |
88-
| The test-suite requires that you have pcre extension |
89-
| enabled. To enable this extension either compile your PHP |
90-
| with --with-pcre-regex or if you've compiled pcre as a |
91-
| shared module load it via php.ini. |
92-
+-----------------------------------------------------------+
93-
94-
NO_PCRE_ERROR;
95-
exit(1);
96-
}
97-
9877
if (!function_exists('proc_open')) {
9978
echo <<<NO_PROC_OPEN_ERROR
10079
@@ -2680,7 +2659,7 @@ function run_test($php, $file, $env)
26802659
$info = " (warn: XFAIL section but test passes)";
26812660
} if (isset($section_text['XLEAK'])) {
26822661
$warn = true;
2683-
$info = " (warn: XLEAK section but test passes)";
2662+
$info = " (warn: XLEAK section but test passes)";
26842663
} else {
26852664
show_result("PASS", $tested, $tested_file, '', $temp_filenames);
26862665
junit_mark_test_as('PASS', $shortname, $tested);
@@ -2704,7 +2683,7 @@ function run_test($php, $file, $env)
27042683
}
27052684

27062685
if ($leaked) {
2707-
$restype[] = isset($section_text['XLEAK']) ?
2686+
$restype[] = isset($section_text['XLEAK']) ?
27082687
'XLEAK' : 'LEAK';
27092688
}
27102689

0 commit comments

Comments
 (0)