1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
|
Author: Sean Finney <seanius@debian.org>
Description: Fix another small batch of broken test cases
* ext/standard/tests/php_ini_loaded_file.phpt: this test only works if
you call run-tests directly, but the included Makefile invokes the
test in such a way that it fails (it explicitly loads an ini file,
and the test assumes that none are loaded). since it therefore seems
like a somewhat useless test it has been removed.
* cli/tests/006.phpt: $subject is <required> according to the docs for
the two pcre functions that report it as such, so the expected string has
been updated to match the output.
* php.orig/ext/posix/tests/posix_errno_variation2.phpt: SIGKILL is not
a defined constant unless the pcntl extension is loaded. As was
done elsewhere (posix_kill_basic.phpt, which oddly seems to do the
same *incredibly sketchy* test that's done here), it's passed as a
variable hardcoded to 9 instead. Did i mention that this test is
sketchy?
Origin: vendor
--- a/ext/posix/tests/posix_errno_variation2.phpt
+++ b/ext/posix/tests/posix_errno_variation2.phpt
@@ -21,7 +21,9 @@ do {
$result = shell_exec("ps -p " . $pid);
} while (strstr($pid, $result));
-posix_kill($pid, SIGKILL);
+/* don't depend on SIGKILL being defined (pcntl might not not be loaded) */
+$SIGKILL = 9;
+posix_kill($pid, $SIGKILL);
var_dump(posix_errno());
?>
--- a/ext/standard/tests/php_ini_loaded_file.phpt
+++ /dev/null
@@ -1,12 +0,0 @@
---TEST--
-Check the php_ini_loaded_file() function. No file is loaded in test, so false ins returned
---CREDITS--
-Sebastian Schürmann
-sschuermann@chip.de
-Testfest 2009 Munich
---FILE--
-<?php
-var_dump(php_ini_loaded_file());
-?>
---EXPECTF--
-string(%d) "%s/tmp-php.ini"
|