fix tests

This commit is contained in:
Stanislav Malyshev 2011-08-01 03:42:02 +00:00
parent 553a08c4e1
commit 30aa3cea6a
22 changed files with 81 additions and 73 deletions

View File

@ -24,14 +24,14 @@ Test posix_times() function : basic functionality
Basic test of POSIX times function
array(5) {
["ticks"]=>
int(%d)
int(%i)
["utime"]=>
int(%d)
int(%i)
["stime"]=>
int(%d)
int(%i)
["cutime"]=>
int(%d)
int(%i)
["cstime"]=>
int(%d)
int(%i)
}
===DONE====

View File

@ -9,7 +9,5 @@ session.upload_progress.freq=-1
var_dump(ini_get("session.upload_progress.freq"));
?>
--EXPECTF--
PHP Warning: PHP Startup: session.upload_progress.freq must be greater than or equal to zero in %s
Warning: PHP Startup: session.upload_progress.freq must be greater than or equal to zero in %s
%unicode|string%(%d) "1%"
string(%d) "1%"

View File

@ -9,7 +9,5 @@ session.upload_progress.freq=200%
var_dump(ini_get("session.upload_progress.freq"));
?>
--EXPECTF--
PHP Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s
Warning: PHP Startup: session.upload_progress.freq cannot be over 100% in %s
%unicode|string%(%d) "1%"
string(%d) "1%"

View File

@ -1,5 +1,7 @@
--TEST--
Test session_encode() function : basic functionality
--INI--
serialize_precision=100
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
@ -120,7 +122,7 @@ string(13) "data|d:-10.5;"
string(20) "data|d:123456789000;"
-- Iteration 8 --
string(29) "data|d:1.2345678899999999E-9;"
string(%d) "data|d:1.2345678899999999145113427164344339914681114578343112953007221221923828125E-9;"
-- Iteration 9 --
string(11) "data|d:0.5;"

View File

@ -79,7 +79,7 @@ foreach($newdirs as $newdir) {
New include path is : %sparse_ini_file_variation3.dir1%sparse_ini_file_variation3.dir2%sparse_ini_file_variation3.dir3%S
array(11) {
["error_reporting"]=>
string(5) "30719"
string(5) "32767"
["display_errors"]=>
string(1) "1"
["display_startup_errors"]=>
@ -101,4 +101,4 @@ array(11) {
["docref_ext"]=>
string(5) ".html"
}
===Done===
===Done===

View File

@ -21,8 +21,11 @@ foreach($streams as $stream)
===DONE===
<?php exit(0); ?>
--EXPECTF--
string(0) ""
string(6) "foobar"
Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s line %d
NULL
Warning: file_get_contents() expects parameter 1 to be a valid path, string given in %s line %d
NULL
string(13) "foobar foobar"
Warning: file_get_contents(data:;base64,#Zm9vYmFyIGZvb2Jhc=): failed to open stream: rfc2397: unable to decode in %sstream_rfc2397_006.php on line %d

View File

@ -98,19 +98,19 @@ File created in => temp dir
Warning: tempnam() expects parameter 1 to be a valid path, string given in %s on line %d
-- File is not created --
Warning: unlink(): Invalid argument in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
-- Iteration 7 --
Warning: tempnam() expects parameter 1 to be a valid path, array given in %s on line %d
-- File is not created --
Warning: unlink(): Invalid argument in %s on line %d
Warning: unlink(): No such file or directory in %s on line %d
-- Iteration 8 --
File name is => /tmp/tempnam_variation3.tmp%s
File name is => %s/tempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir
-- Iteration 9 --
File name is => /tmp/tempnam_variation3.tmp%s
File name is => %s/tempnam_variation3.tmp%s
File permissions are => 100600
File created in => temp dir

View File

@ -1,5 +1,11 @@
--TEST--
Test function getservbyname() by substituting argument 2 with emptyUnsetUndefNull values.
--SKIPIF--
<?php
if(PHP_OS == 'Darwin') {
die("skip.. Mac OS X is fine with NULLs in getservbyname");
}
?>
--FILE--
<?php

View File

@ -1,5 +1,11 @@
--TEST--
Test function getservbyname() by substituting argument 2 with boolean values.
--SKIPIF--
<?php
if(PHP_OS == 'Darwin') {
die("skip.. Mac OS X is fine with NULLs in getservbyname");
}
?>
--FILE--
<?php

View File

@ -12,7 +12,7 @@ boolno = no
string = asdadfsdjkslkj ¡@£$$ { }[ ]/%#¤
sqstring = 'adsasdadasdasd'
dqstring = "asdadfsdjkslkj ¡@£$$ { } !^~|¥¥{[()/)&/% ¤ # #"
php_constant = E_ALL
php_constant = E_WARNING
user_constant = TEST_CONSTANT
[basic with whitespace]
@ -28,7 +28,7 @@ boolnone = none
boolno = no
sqstring = 'adsasdadasdasd'
dqstring = "asdadfsdjkslkj ¡@£$$€¥¥{[()/)&/%#¤"
php_constant = E_ALL
php_constant = E_WARNING
[comments]
; some comment

View File

@ -45,7 +45,7 @@ array(26) {
["dqstring"]=>
string(51) "asdadfsdjkslkj ¡@£$$ { } !^~|¥¥{[()/)&/% ¤ # #"
["php_constant"]=>
string(5) "30719"
string(1) "2"
["user_constant"]=>
string(21) "this_is_test_constant"
}
@ -76,7 +76,7 @@ array(26) {
["dqstring"]=>
string(41) "asdadfsdjkslkj ¡@£$$€¥¥{[()/)&/%#¤"
["php_constant"]=>
string(5) "30719"
string(1) "2"
}
["comments"]=>
array(1) {

View File

@ -15,15 +15,15 @@ array(3) {
["error_reporting values"]=>
array(6) {
["foo"]=>
string(7) "30719 8"
string(7) "32767 8"
["error_reporting"]=>
string(5) "30719"
string(5) "32767"
["error_reporting1"]=>
string(4) "4177"
["error_reporting2"]=>
string(5) "30711"
string(5) "32759"
["error_reporting3"]=>
string(5) "30711"
string(5) "32759"
["error_reporting4"]=>
string(5) "32759"
}

View File

@ -36,7 +36,6 @@ Debug Build => %s
Thread Safety => %s
Zend Signal Handling => %s
Zend Memory Manager => %s
Zend Signal Handling => %s
Zend Multibyte Support => %s
IPv6 Support => %s
DTrace Support => %s

View File

@ -13,7 +13,7 @@ if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
<?php
function getNice($id)
{
$res = shell_exec('ps -p ' . $id .' -o "%p %n"');
$res = shell_exec('ps -p ' . $id .' -o "pid,nice"');
preg_match('/^\s*\w+\s+\w+\s*(\d+)\s+(\d+)/m', $res, $matches);
if (count($matches) > 2)
return $matches[2];

View File

@ -6,20 +6,23 @@ if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
?>
--FILE--
<?php
echo "*** Test by calling method or function with incorrect numbers of arguments ***\n";
$priority = 1;
echo "*** Test by calling method or function with incorrect numbers of arguments ***\n"
$extra_arg = 1;
$priority =
$extra_arg =
var_dump(proc_nice( $priority, $extra_arg ) );
var_dump(proc_nice( $priority, $extra_arg) );
var_dump(proc_nice( ) );
?>
--EXPECTF--
Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in %s on line %d
*** Test by calling method or function with incorrect numbers of arguments ***
Warning: proc_nice() expects exactly 1 parameter, 2 given in %s line %d
bool(false)
Warning: proc_nice() expects exactly 1 parameter, 0 given in %s line %d
bool(false)

View File

@ -13,11 +13,6 @@ echo "Simple testcase for set_magic_quotes_runtime() function - basic test\n";
$g = get_magic_quotes_runtime();
echo "\n-- magic quotes runtime set in INI file: " . $g . "--\n";
echo "\n-- Set magic quotes runtime to 1: --\n";
var_dump(set_magic_quotes_runtime(1));
$g = get_magic_quotes_runtime();
echo "\n-- magic quotes runtime after set: " . $g . " --\n";
echo "\n-- Set magic quotes runtime to 0: --\n";
var_dump(set_magic_quotes_runtime(0));
$g = get_magic_quotes_runtime();
@ -33,26 +28,23 @@ echo "\n-- magic quotes runtime after set: " . $g . " --\n";
--EXPECTF--
Simple testcase for set_magic_quotes_runtime() function - basic test
-- magic quotes runtime set in INI file: 0--
Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
-- Set magic quotes runtime to 1: --
Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
bool(true)
-- magic quotes runtime after set: 1 --
-- magic quotes runtime set in INI file: --
-- Set magic quotes runtime to 0: --
Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
bool(true)
bool(false)
-- magic quotes runtime after set: 0 --
Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
-- magic quotes runtime after set: --
-- Set magic quotes runtime to 1: --
Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
bool(true)
-- magic quotes runtime after set: 1 --
===DONE===
Fatal error: set_magic_quotes_runtime(): magic_quotes_runtime is not supported anymore in Unknown on line 0

View File

@ -6,7 +6,7 @@ if(substr(PHP_OS, 0, 3) == "WIN")
die("skip Won't run on Windows");
?>
--INI--
sendmail_path="sed > /tmp/php_test_mailBasic2.out"
sendmail_path="cat > /tmp/php_test_mailBasic2.out"
mail.add_x_header = Off
--FILE--
<?php
@ -24,7 +24,7 @@ $to = 'user@company.com';
$subject = 'Test Subject';
$message = 'A Message';
$additional_headers = 'KHeaders';
$additional_parameters = "-e '5 a--- Extras'";
$additional_parameters = "-n";
$outFile = "/tmp/php_test_mailBasic2.out";
@unlink($outFile);
@ -36,14 +36,13 @@ echo file_get_contents($outFile);
unlink($outFile);
?>
===DONE===
--EXPECT--
--EXPECTF--
*** Testing mail() : basic functionality ***
-- extra parameters --
bool(true)
To: user@company.com
Subject: Test Subject
KHeaders
A Message
--- Extras
%w1%wTo: user@company.com
%w2%wSubject: Test Subject
%w3%wKHeaders
%w4%w
%w5%wA Message
===DONE===

View File

@ -1,8 +1,8 @@
--TEST--
Test mail() function : variation force extra parameters
--INI--
sendmail_path="sed > /tmp/php_test_mailVariation2.out"
mail.force_extra_parameters="-e4a---forced-params"
sendmail_path="cat > /tmp/php_test_mailVariation2.out"
mail.force_extra_parameters="-n"
mail.add_x_header = Off
--SKIPIF--
<?php
@ -33,12 +33,11 @@ unlink($outFile);
?>
===DONE===
--EXPECT--
--EXPECTF--
*** Testing mail() : basic functionality ***
bool(true)
To: user@company.com
Subject: Test Subject
A Message
---forced-params
%w1%wTo: user@company.com
%w2%wSubject: Test Subject
%w3%w
%w4%wA Message
===DONE===

View File

@ -14,4 +14,6 @@ fwrite($sock, "3");
int(%d)
int(%d)
Notice: fwrite(): send of 1 bytes failed with errno=61 Connection refused in %s on line %d
Warning: fwrite(): %d is not a valid stream resource in %s on line %d

View File

@ -16,5 +16,6 @@ mbstring.internal_encoding=pass
setlocale( LC_CTYPE, "ja_JP.EUC-JP", "ja_JP.eucJP" );
var_dump(htmlentities("\xa1\xa2\xa1\xa3\xa1\xa4", ENT_QUOTES, ''));
?>
--EXPECT--
--EXPECTF--
Strict Standards: htmlentities(): Only basic entities substitution is supported for multi-byte encodings other than UTF-8; functionality is equivalent to htmlspecialchars in %s line %d
string(6) "、。·"