Prefer EXPECT over EXPECTF

This commit is contained in:
Patrick Allaert 2021-06-29 15:34:26 +02:00 committed by Patrick Allaert
parent fa71a11fe2
commit ac18dd0dc7
48 changed files with 54 additions and 54 deletions

View file

@ -40,7 +40,7 @@ try {
echo $exception->getMessage() . "\n"; echo $exception->getMessage() . "\n";
} }
?> ?>
--EXPECTF-- --EXPECT--
array(4) { array(4) {
[0]=> [0]=>
int(7) int(7)

View file

@ -10,7 +10,7 @@ var_dump($fiber->getReturn());
var_dump($fiber->isTerminated()); var_dump($fiber->isTerminated());
?> ?>
--EXPECTF-- --EXPECT--
bool(false) bool(false)
NULL NULL
string(4) "test" string(4) "test"

View file

@ -22,6 +22,6 @@ try {
echo "done\n"; echo "done\n";
?> ?>
--EXPECTF-- --EXPECT--
Cannot suspend in a force-closed fiber Cannot suspend in a force-closed fiber
done done

View file

@ -29,7 +29,7 @@ unset($fiber); // Destroy fiber object, executing finally block.
echo "done\n"; echo "done\n";
?> ?>
--EXPECTF-- --EXPECT--
fiber fiber
inner finally inner finally
outer finally outer finally

View file

@ -93,7 +93,7 @@ try {
} }
?> ?>
--EXPECTF-- --EXPECT--
3 3
3.10 3.10
2.00 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 bccomp(): Argument #1 ($num1) is not well-formed
bccomp(): Argument #1 ($num1) is not well-formed bccomp(): Argument #1 ($num1) is not well-formed

View file

@ -16,7 +16,7 @@ try {
echo $ex->getMessage(), PHP_EOL; echo $ex->getMessage(), PHP_EOL;
} }
?> ?>
--EXPECTF-- --EXPECT--
int(2170713600) int(2170713600)
int(9223372036854720000) int(9223372036854720000)
jday must be between 2440588 and 106751993607888 jday must be between 2440588 and 106751993607888

View file

@ -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
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

View file

@ -13,5 +13,5 @@ try {
echo $ex->getMessage(), PHP_EOL; echo $ex->getMessage(), PHP_EOL;
} }
?> ?>
--EXPECTF-- --EXPECT--
Hierarchy Request Error Hierarchy Request Error

View file

@ -9,5 +9,5 @@ $doc = new \DOMDocument();
$doc->loadXML('<a><!-- foo --></a>'); $doc->loadXML('<a><!-- foo --></a>');
$doc->documentElement->firstChild->remove(); $doc->documentElement->firstChild->remove();
echo $doc->saveXML($doc->documentElement); echo $doc->saveXML($doc->documentElement);
--EXPECTF-- --EXPECT--
<a/> <a/>

View file

@ -11,7 +11,7 @@ echo $tags['GPS']['GPSLatitude'][0] . PHP_EOL;
echo $tags['GPS']['GPSLongitude'][0] . PHP_EOL; echo $tags['GPS']['GPSLongitude'][0] . PHP_EOL;
?> ?>
===DONE=== ===DONE===
--EXPECTF-- --EXPECT--
38/1 38/1
122/1 122/1
===DONE=== ===DONE===

View file

@ -21,6 +21,6 @@ try {
echo $e->getMessage() . \PHP_EOL; echo $e->getMessage() . \PHP_EOL;
} }
?> ?>
--EXPECTF-- --EXPECT--
IntlCalendar::roll(): Argument #1 ($field) must be a valid field IntlCalendar::roll(): Argument #1 ($field) must be a valid field
intlcal_roll(): Argument #1 ($calendar) must be of type IntlCalendar, int given intlcal_roll(): Argument #1 ($calendar) must be of type IntlCalendar, int given

View file

@ -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]]); ldap_delete($link, "cn=userref2,$base", [['oid' => LDAP_CONTROL_MANAGEDSAIT, 'iscritical' => TRUE]]);
remove_dummy_data($link, $base); remove_dummy_data($link, $base);
?> ?>
--EXPECTF-- --EXPECT--
int(2) int(2)

View file

@ -44,7 +44,7 @@ var_dump(strpos(parseXML4($xml), 'SECRET_DATA') === false);
echo "Done\n"; echo "Done\n";
?> ?>
--EXPECTF-- --EXPECT--
bool(true) bool(true)
bool(true) bool(true)
bool(true) bool(true)

View file

@ -55,6 +55,6 @@ if (!$link->query('DROP TABLE IF EXISTS test')) {
$link->close(); $link->close();
unlink('bug77956.data'); 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 [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

View file

@ -35,5 +35,5 @@ $mysqli->close();
<?php <?php
require_once "clean_table.inc"; require_once "clean_table.inc";
?> ?>
--EXPECTF-- --EXPECT--
Commands out of sync; you can't run this command now Commands out of sync; you can't run this command now

View file

@ -129,5 +129,5 @@ max_execution_time=240
mysqli_query($link, 'DROP USER pamtest'); mysqli_query($link, 'DROP USER pamtest');
mysqli_query($link, 'DROP USER pamtest@localhost'); mysqli_query($link, 'DROP USER pamtest@localhost');
?> ?>
--EXPECTF-- --EXPECT--
done! done!

View file

@ -307,7 +307,7 @@ require_once('skipifconnectfailure.inc');
<?php <?php
require_once("clean_table.inc"); require_once("clean_table.inc");
?> ?>
--EXPECTF-- --EXPECT--
[005] [005]
array(2) { array(2) {
[0]=> [0]=>

View file

@ -287,7 +287,7 @@ require_once('skipifconnectfailure.inc');
print "done!"; print "done!";
?> ?>
--EXPECTF-- --EXPECT--
[005] [005]
array(4) { array(4) {
[0]=> [0]=>

View file

@ -283,7 +283,7 @@ require_once('skipifconnectfailure.inc');
<?php <?php
require_once("clean_table.inc"); require_once("clean_table.inc");
?> ?>
--EXPECTF-- --EXPECT--
[005] [005]
array(4) { array(4) {
[0]=> [0]=>

View file

@ -85,7 +85,7 @@ require_once('skipifconnectfailure.inc');
<?php <?php
require_once("clean_table.inc"); require_once("clean_table.inc");
?> ?>
--EXPECTF-- --EXPECT--
mysqli_stmt object is not fully initialized mysqli_stmt object is not fully initialized
int(3) int(3)
int(1) int(1)

View file

@ -49,7 +49,7 @@ oci8_test_sql_execute($c, $stmtarray);
echo "Done\n"; echo "Done\n";
?> ?>
--EXPECTF-- --EXPECT--
bool(true) bool(true)
bool(false) bool(false)
oci_define_by_name(): Argument #2 ($column) cannot be empty oci_define_by_name(): Argument #2 ($column) cannot be empty

View file

@ -71,7 +71,7 @@ $statement = oci_parse($c, $drop);
echo "Done\n"; echo "Done\n";
?> ?>
--EXPECTF-- --EXPECT--
OCILob::save(): Argument #2 ($offset) must be greater than or equal to 0 OCILob::save(): Argument #2 ($offset) must be greater than or equal to 0
string(4) "data" string(4) "data"

View file

@ -37,7 +37,7 @@ try {
} }
?> ?>
--EXPECTF-- --EXPECT--
Test 1: Import Test 1: Import
OCILob::savefile(): Argument #1 ($filename) must not contain any null bytes OCILob::savefile(): Argument #1 ($filename) must not contain any null bytes
Test 2: Export Test 2: Export

View file

@ -17,6 +17,6 @@ if ($pid == 0) {
exit; exit;
} }
?> ?>
--EXPECTF-- --EXPECT--
*** Test with no flags *** *** Test with no flags ***
child child

View file

@ -11,5 +11,5 @@ try {
var_dump(!empty($e->errorInfo) && is_array($e->errorInfo)); var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
} }
?> ?>
--EXPECTF-- --EXPECT--
bool(true) bool(true)

View file

@ -11,5 +11,5 @@ try {
var_dump(!empty($e->errorInfo) && is_array($e->errorInfo)); var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
} }
?> ?>
--EXPECTF-- --EXPECT--
bool(true) bool(true)

View file

@ -11,5 +11,5 @@ try {
var_dump(!empty($e->errorInfo) && is_array($e->errorInfo)); var_dump(!empty($e->errorInfo) && is_array($e->errorInfo));
} }
?> ?>
--EXPECTF-- --EXPECT--
bool(true) bool(true)

View file

@ -37,7 +37,7 @@ try {
print "Done!\n"; print "Done!\n";
?> ?>
--EXPECTF-- --EXPECT--
Session is not active Session is not active
Session is not active Session is not active
Session is not active Session is not active

View file

@ -11,5 +11,5 @@ try {
print $e->getMessage(); print $e->getMessage();
} }
?> ?>
--EXPECTF-- --EXPECT--
SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <> SOAP-ERROR: Parsing WSDL: Unexpected WSDL element <>

View file

@ -24,7 +24,7 @@ $rounded_up_val = socket_get_option( $socket, SOL_TCP, TCP_DEFER_ACCEPT);
socket_close($socket); socket_close($socket);
var_dump($rounded_up_val > $initial_val); // Value rounded up by the kernel, might differ from kernel version/setting 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 *** *** Test with TCP_DEFER_ACCEPT with initial SYN/ACK 'timeout' value to rounded up one ***
bool(true) bool(true)
bool(true) bool(true)

View file

@ -15,7 +15,7 @@ try {
echo $exception->getMessage() . "\n"; echo $exception->getMessage() . "\n";
} }
?> ?>
--EXPECTF-- --EXPECT--
socket_select(): At least one array argument must be passed socket_select(): At least one array argument must be passed
--CREDITS-- --CREDITS--
Till Klampaeckel, till@php.net Till Klampaeckel, till@php.net

View file

@ -88,7 +88,7 @@ var_dump(count($arr, COUNT_RECURSIVE));
fclose( $resource1 ); fclose( $resource1 );
closedir( $resource2 ); closedir( $resource2 );
?> ?>
--EXPECTF-- --EXPECT--
*** Testing basic functionality of count() function *** *** Testing basic functionality of count() function ***
-- Testing arrays -- -- Testing arrays --
COUNT_NORMAL: should be 2, is 2 COUNT_NORMAL: should be 2, is 2

View file

@ -79,7 +79,7 @@ $dirname = __DIR__."/symlink_link_linkinfo_is_link_basic1";
unlink("$dirname/symlink_link_linkinfo_is_link_basic1.tmp"); unlink("$dirname/symlink_link_linkinfo_is_link_basic1.tmp");
rmdir($dirname); rmdir($dirname);
?> ?>
--EXPECTF-- --EXPECT--
*** Testing symlink(), linkinfo(), link() and is_link() : basic functionality *** *** Testing symlink(), linkinfo(), link() and is_link() : basic functionality ***
-- Iteration 1 -- -- Iteration 1 --

View file

@ -101,7 +101,7 @@ rmdir("$dirname/test/home");
rmdir("$dirname/test"); rmdir("$dirname/test");
rmdir($dirname); rmdir($dirname);
?> ?>
--EXPECTF-- --EXPECT--
*** Testing symlink(), link(), linkinfo() and is_link() with linknames stored as members in an object *** *** Testing symlink(), link(), linkinfo() and is_link() with linknames stored as members in an object ***
-- Working with soft links -- -- Working with soft links --

View file

@ -89,7 +89,7 @@ $filename = "$dirname/symlink_link_linkinfo_is_link_variation9.tmp";
unlink($filename); unlink($filename);
rmdir($dirname); rmdir($dirname);
?> ?>
--EXPECTF-- --EXPECT--
*** Checking lstat() on soft link *** *** Checking lstat() on soft link ***
bool(true) bool(true)
linkinfo() returns integer !== -1: bool(true) linkinfo() returns integer !== -1: bool(true)

View file

@ -48,7 +48,7 @@ while ($pipes) {
} }
?> ?>
--EXPECTF-- --EXPECT--
bool(true) bool(true)
bool(true) bool(true)
PIPE 1 << hello PIPE 1 << hello

View file

@ -59,7 +59,7 @@ fclose($pipes[0]);
printf("STDOUT << %s\n", read_pipe($pipes[1])); printf("STDOUT << %s\n", read_pipe($pipes[1]));
?> ?>
--EXPECTF-- --EXPECT--
bool(true) bool(true)
bool(true) bool(true)
STDOUT << hello STDOUT << hello

View file

@ -48,7 +48,7 @@ fclose($pipes[0]);
printf("STDOUT << %s\n", read_pipe($pipes[1])); printf("STDOUT << %s\n", read_pipe($pipes[1]));
?> ?>
--EXPECTF-- --EXPECT--
bool(true) bool(true)
STDOUT << hello STDOUT << hello
STDOUT << world STDOUT << world

View file

@ -21,6 +21,6 @@ var_dump(stream_get_meta_data($stream)['wrapper_data'][1] === "Location: $url");
http_server_kill($pid); http_server_kill($pid);
?> ?>
--EXPECTF-- --EXPECT--
string(4) "Body" string(4) "Body"
bool(true) bool(true)

View file

@ -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 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

View file

@ -27,7 +27,7 @@ try {
} }
?> ?>
--EXPECTF-- --EXPECT--
Current Value of 'tidy-mark': bool(false) Current Value of 'tidy-mark': bool(false)
Current Value of 'error-file': string(0) "" Current Value of 'error-file': string(0) ""
Current Value of 'tab-size': int(8) Current Value of 'tab-size': int(8)

View file

@ -41,7 +41,7 @@ var_dump(file_get_contents($file));
echo "Done\n"; echo "Done\n";
?> ?>
--EXPECTF-- --EXPECT--
bool(true) bool(true)
bool(true) bool(true)
bool(true) bool(true)

View file

@ -20,7 +20,7 @@ var_dump($value); // NULL
var_dump($fiber->getReturn()); // int(1) var_dump($fiber->getReturn()); // int(1)
?> ?>
--EXPECTF-- --EXPECT--
int(123) int(123)
int(246) int(246)
NULL NULL

View file

@ -16,7 +16,7 @@ var_dump($test->start()); // int(1)
var_dump($test->resume(2)); // NULL var_dump($test->resume(2)); // NULL
?> ?>
--EXPECTF-- --EXPECT--
int(1) int(1)
int(2) int(2)
NULL NULL

View file

@ -29,7 +29,7 @@ var_dump($value); // NULL
var_dump($fiber->getReturn()); // int(-1) var_dump($fiber->getReturn()); // int(-1)
?> ?>
--EXPECTF-- --EXPECT--
int(1) int(1)
int(2) int(2)
int(3) int(3)

View file

@ -27,7 +27,7 @@ var_dump($value); // int(3)
$value = $test->resume(2 * $value); $value = $test->resume(2 * $value);
?> ?>
--EXPECTF-- --EXPECT--
int(1) int(1)
int(2) int(2)
int(3) int(3)

View file

@ -28,7 +28,7 @@ var_dump($test->resume('10')); // NULL
var_dump($fiber->resume('2')); // NULL var_dump($fiber->resume('2')); // NULL
?> ?>
--EXPECTF-- --EXPECT--
int(10) int(10)
int(1) int(1)
string(1) "1" string(1) "1"

View file

@ -16,6 +16,6 @@ $fiber->pipeTo(function (int $result): void {
var_dump($fiber->start()); var_dump($fiber->start());
?> ?>
--EXPECTF-- --EXPECT--
int(1) int(1)
NULL NULL