mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Prefer EXPECT over EXPECTF
This commit is contained in:
parent
fa71a11fe2
commit
ac18dd0dc7
@ -40,7 +40,7 @@ try {
|
||||
echo $exception->getMessage() . "\n";
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
array(4) {
|
||||
[0]=>
|
||||
int(7)
|
||||
|
@ -10,7 +10,7 @@ var_dump($fiber->getReturn());
|
||||
var_dump($fiber->isTerminated());
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
bool(false)
|
||||
NULL
|
||||
string(4) "test"
|
||||
|
@ -22,6 +22,6 @@ try {
|
||||
echo "done\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Cannot suspend in a force-closed fiber
|
||||
done
|
||||
|
@ -29,7 +29,7 @@ unset($fiber); // Destroy fiber object, executing finally block.
|
||||
echo "done\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
fiber
|
||||
inner finally
|
||||
outer finally
|
||||
|
@ -93,7 +93,7 @@ try {
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
3
|
||||
3.10
|
||||
2.00
|
||||
@ -117,4 +117,4 @@ bccomp(): Argument #1 ($num1) is not well-formed
|
||||
bccomp(): Argument #1 ($num1) is not well-formed
|
||||
bccomp(): Argument #1 ($num1) is not well-formed
|
||||
bccomp(): Argument #1 ($num1) is not well-formed
|
||||
bccomp(): Argument #1 ($num1) is not well-formed
|
||||
bccomp(): Argument #1 ($num1) is not well-formed
|
||||
|
@ -16,7 +16,7 @@ try {
|
||||
echo $ex->getMessage(), PHP_EOL;
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
int(2170713600)
|
||||
int(9223372036854720000)
|
||||
jday must be between 2440588 and 106751993607888
|
||||
|
@ -19,6 +19,6 @@ try {
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
timezone_identifiers_list(): Argument #2 ($countryCode) must be a two-letter ISO 3166-1 compatible country code when argument #1 ($timezoneGroup) is DateTimeZone::PER_COUNTRY
|
||||
timezone_identifiers_list(): Argument #2 ($countryCode) must be a two-letter ISO 3166-1 compatible country code when argument #1 ($timezoneGroup) is DateTimeZone::PER_COUNTRY
|
||||
|
@ -13,5 +13,5 @@ try {
|
||||
echo $ex->getMessage(), PHP_EOL;
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Hierarchy Request Error
|
||||
|
@ -9,5 +9,5 @@ $doc = new \DOMDocument();
|
||||
$doc->loadXML('<a><!-- foo --></a>');
|
||||
$doc->documentElement->firstChild->remove();
|
||||
echo $doc->saveXML($doc->documentElement);
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
<a/>
|
||||
|
@ -11,7 +11,7 @@ echo $tags['GPS']['GPSLatitude'][0] . PHP_EOL;
|
||||
echo $tags['GPS']['GPSLongitude'][0] . PHP_EOL;
|
||||
?>
|
||||
===DONE===
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
38/1
|
||||
122/1
|
||||
===DONE===
|
||||
|
@ -21,6 +21,6 @@ try {
|
||||
echo $e->getMessage() . \PHP_EOL;
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
IntlCalendar::roll(): Argument #1 ($field) must be a valid field
|
||||
intlcal_roll(): Argument #1 ($calendar) must be of type IntlCalendar, int given
|
||||
|
@ -33,5 +33,5 @@ ldap_delete($link, "cn=userref,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'isc
|
||||
ldap_delete($link, "cn=userref2,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'iscritical' => TRUE]]);
|
||||
remove_dummy_data($link, $base);
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
int(2)
|
||||
|
@ -44,7 +44,7 @@ var_dump(strpos(parseXML4($xml), 'SECRET_DATA') === false);
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
@ -55,6 +55,6 @@ if (!$link->query('DROP TABLE IF EXISTS test')) {
|
||||
$link->close();
|
||||
unlink('bug77956.data');
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
[006] [2000] LOAD DATA LOCAL INFILE is forbidden, check related settings like mysqli.allow_local_infile|mysqli.local_infile_directory or PDO::MYSQL_ATTR_LOCAL_INFILE|PDO::MYSQL_ATTR_LOCAL_INFILE_DIRECTORY
|
||||
done
|
||||
done
|
||||
|
@ -35,5 +35,5 @@ $mysqli->close();
|
||||
<?php
|
||||
require_once "clean_table.inc";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Commands out of sync; you can't run this command now
|
||||
|
@ -129,5 +129,5 @@ max_execution_time=240
|
||||
mysqli_query($link, 'DROP USER pamtest');
|
||||
mysqli_query($link, 'DROP USER pamtest@localhost');
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
done!
|
||||
|
@ -307,7 +307,7 @@ require_once('skipifconnectfailure.inc');
|
||||
<?php
|
||||
require_once("clean_table.inc");
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
[005]
|
||||
array(2) {
|
||||
[0]=>
|
||||
|
@ -287,7 +287,7 @@ require_once('skipifconnectfailure.inc');
|
||||
|
||||
print "done!";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
[005]
|
||||
array(4) {
|
||||
[0]=>
|
||||
|
@ -283,7 +283,7 @@ require_once('skipifconnectfailure.inc');
|
||||
<?php
|
||||
require_once("clean_table.inc");
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
[005]
|
||||
array(4) {
|
||||
[0]=>
|
||||
|
@ -85,7 +85,7 @@ require_once('skipifconnectfailure.inc');
|
||||
<?php
|
||||
require_once("clean_table.inc");
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
mysqli_stmt object is not fully initialized
|
||||
int(3)
|
||||
int(1)
|
||||
|
@ -49,7 +49,7 @@ oci8_test_sql_execute($c, $stmtarray);
|
||||
echo "Done\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(false)
|
||||
oci_define_by_name(): Argument #2 ($column) cannot be empty
|
||||
|
@ -71,7 +71,7 @@ $statement = oci_parse($c, $drop);
|
||||
echo "Done\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
|
||||
OCILob::save(): Argument #2 ($offset) must be greater than or equal to 0
|
||||
string(4) "data"
|
||||
|
@ -37,7 +37,7 @@ try {
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Test 1: Import
|
||||
OCILob::savefile(): Argument #1 ($filename) must not contain any null bytes
|
||||
Test 2: Export
|
||||
|
@ -17,6 +17,6 @@ if ($pid == 0) {
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
*** Test with no flags ***
|
||||
child
|
||||
|
@ -11,5 +11,5 @@ try {
|
||||
var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
|
@ -11,5 +11,5 @@ try {
|
||||
var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
|
@ -11,5 +11,5 @@ try {
|
||||
var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
bool(true)
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
|
@ -37,7 +37,7 @@ try {
|
||||
print "Done!\n";
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Session is not active
|
||||
Session is not active
|
||||
Session is not active
|
||||
|
@ -11,5 +11,5 @@ try {
|
||||
print $e->getMessage();
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <>
|
||||
--EXPECT--
|
||||
SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <>
|
||||
|
@ -24,7 +24,7 @@ $rounded_up_val = socket_get_option( $socket, SOL_TCP, TCP_DEFER_ACCEPT);
|
||||
socket_close($socket);
|
||||
var_dump($rounded_up_val > $initial_val); // Value rounded up by the kernel, might differ from kernel version/setting
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
*** Test with TCP_DEFER_ACCEPT with initial SYN/ACK 'timeout' value to rounded up one ***
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
@ -15,7 +15,7 @@ try {
|
||||
echo $exception->getMessage() . "\n";
|
||||
}
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
socket_select(): At least one array argument must be passed
|
||||
--CREDITS--
|
||||
Till Klampaeckel, till@php.net
|
||||
|
@ -88,7 +88,7 @@ var_dump(count($arr, COUNT_RECURSIVE));
|
||||
fclose( $resource1 );
|
||||
closedir( $resource2 );
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
*** Testing basic functionality of count() function ***
|
||||
-- Testing arrays --
|
||||
COUNT_NORMAL: should be 2, is 2
|
||||
|
@ -79,7 +79,7 @@ $dirname = __DIR__."/symlink_link_linkinfo_is_link_basic1";
|
||||
unlink("$dirname/symlink_link_linkinfo_is_link_basic1.tmp");
|
||||
rmdir($dirname);
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
*** Testing symlink(), linkinfo(), link() and is_link() : basic functionality ***
|
||||
|
||||
-- Iteration 1 --
|
||||
|
@ -101,7 +101,7 @@ rmdir("$dirname/test/home");
|
||||
rmdir("$dirname/test");
|
||||
rmdir($dirname);
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
*** Testing symlink(), link(), linkinfo() and is_link() with linknames stored as members in an object ***
|
||||
|
||||
-- Working with soft links --
|
||||
|
@ -89,7 +89,7 @@ $filename = "$dirname/symlink_link_linkinfo_is_link_variation9.tmp";
|
||||
unlink($filename);
|
||||
rmdir($dirname);
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
*** Checking lstat() on soft link ***
|
||||
bool(true)
|
||||
linkinfo() returns integer !== -1: bool(true)
|
||||
|
@ -48,7 +48,7 @@ while ($pipes) {
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
PIPE 1 << hello
|
||||
|
@ -59,7 +59,7 @@ fclose($pipes[0]);
|
||||
printf("STDOUT << %s\n", read_pipe($pipes[1]));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
STDOUT << hello
|
||||
|
@ -48,7 +48,7 @@ fclose($pipes[0]);
|
||||
printf("STDOUT << %s\n", read_pipe($pipes[1]));
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
STDOUT << hello
|
||||
STDOUT << world
|
||||
|
@ -21,6 +21,6 @@ var_dump(stream_get_meta_data($stream)['wrapper_data'][1] === "Location: $url");
|
||||
|
||||
http_server_kill($pid);
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
string(4) "Body"
|
||||
bool(true)
|
||||
|
@ -51,7 +51,7 @@ try {
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
64-bit format codes are not available for 32-bit versions of PHP
|
||||
64-bit format codes are not available for 32-bit versions of PHP
|
||||
64-bit format codes are not available for 32-bit versions of PHP
|
||||
|
@ -27,7 +27,7 @@ try {
|
||||
}
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
Current Value of 'tidy-mark': bool(false)
|
||||
Current Value of 'error-file': string(0) ""
|
||||
Current Value of 'tab-size': int(8)
|
||||
|
@ -41,7 +41,7 @@ var_dump(file_get_contents($file));
|
||||
|
||||
echo "Done\n";
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
@ -20,7 +20,7 @@ var_dump($value); // NULL
|
||||
var_dump($fiber->getReturn()); // int(1)
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
int(123)
|
||||
int(246)
|
||||
NULL
|
||||
|
@ -16,7 +16,7 @@ var_dump($test->start()); // int(1)
|
||||
var_dump($test->resume(2)); // NULL
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(2)
|
||||
NULL
|
||||
|
@ -29,7 +29,7 @@ var_dump($value); // NULL
|
||||
var_dump($fiber->getReturn()); // int(-1)
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(2)
|
||||
int(3)
|
||||
|
@ -27,7 +27,7 @@ var_dump($value); // int(3)
|
||||
$value = $test->resume(2 * $value);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
int(1)
|
||||
int(2)
|
||||
int(3)
|
||||
|
@ -28,7 +28,7 @@ var_dump($test->resume('10')); // NULL
|
||||
var_dump($fiber->resume('2')); // NULL
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
int(10)
|
||||
int(1)
|
||||
string(1) "1"
|
||||
|
@ -16,6 +16,6 @@ $fiber->pipeTo(function (int $result): void {
|
||||
var_dump($fiber->start());
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
--EXPECT--
|
||||
int(1)
|
||||
NULL
|
||||
|
Loading…
Reference in New Issue
Block a user