]> granicus.if.org Git - php/commitdiff
fix tests
authorStanislav Malyshev <stas@php.net>
Mon, 1 Aug 2011 03:42:02 +0000 (03:42 +0000)
committerStanislav Malyshev <stas@php.net>
Mon, 1 Aug 2011 03:42:02 +0000 (03:42 +0000)
22 files changed:
ext/posix/tests/posix_times_basic.phpt
ext/session/tests/rfc1867_invalid_settings.phpt
ext/session/tests/rfc1867_invalid_settings_2.phpt
ext/session/tests/session_encode_basic.phpt
ext/standard/tests/file/copy_variation4.phpt
ext/standard/tests/file/parse_ini_file_variation3.phpt
ext/standard/tests/file/stream_rfc2397_006.phpt
ext/standard/tests/file/tempnam_variation7.phpt
ext/standard/tests/general_functions/getservbyname_variation10.phpt
ext/standard/tests/general_functions/getservbyname_variation9.phpt
ext/standard/tests/general_functions/parse_ini_basic.data
ext/standard/tests/general_functions/parse_ini_basic.phpt
ext/standard/tests/general_functions/parse_ini_booleans.phpt
ext/standard/tests/general_functions/phpinfo.phpt
ext/standard/tests/general_functions/proc_nice_basic.phpt
ext/standard/tests/general_functions/proc_nice_error.phpt
ext/standard/tests/general_functions/set_magic_quotes_runtime_basic.phpt
ext/standard/tests/mail/mail_basic2.phpt
ext/standard/tests/mail/mail_variation2.phpt
ext/standard/tests/serialize/serialization_miscTypes_001.phpt
ext/standard/tests/streams/bug54623.phpt
ext/standard/tests/strings/htmlentities04.phpt

index eb8af10df4092f41cb93dc82b1555bc05e360db9..5da6434b1433b7f7c133eca6c6985f52f9415827 100644 (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====
index e973a1bd5f21f89f7f04c6e1bc682db9059d5f1c..29fe630509acc00da8bfbb851e6671616b2a9118 100644 (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%"
index 7853a685114d5b533d4a5e05d6567177b482eaea..bd35852c1dbfb3c76c4378ad0e1e9c1d637ee0a2 100644 (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%"
index b087f7441404f1711d34d6095d9926dbdace2323..dfe40d204d0860714ff6338bdc32723b40adc6bc 100644 (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;"
index 48386743f325e3cfedaa7712443a6af249aa9593..3c8224da0a917e8284f362c79fb1d050ff02e519 100644 (file)
Binary files a/ext/standard/tests/file/copy_variation4.phpt and b/ext/standard/tests/file/copy_variation4.phpt differ
index 77ffa07415ed1d7590947f9338c1622a72ba9044..43b0274ea9e381f90ed3dd180399c88426e981a9 100644 (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===
\ No newline at end of file
+===Done===
index dab6cd5612e2cc928fc1a619c1439d0b8782d02f..e6694a2861628d93ac61940fd712766892a3836f 100755 (executable)
@@ -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
index dd823d47a22d36833e427eb5a81cbb24f76f7824..b21a123ab77742d0c81c4c9e5e72b9d9ee1689f1 100644 (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
 
index 70aa5676465c997f452d025decf66924ddca12f8..c7ed144f109fa64102322723f4917c9c21e4f328 100755 (executable)
@@ -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
 
index c1c231e1483bd958c176cd90a572d6f37ea5e822..eef2744c260e3ce4a71652751cda7a63a52f8b90 100755 (executable)
@@ -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
 
index fdbd55cbf92677d06d89b8b9f0950c41ea38e374..cafbb157424af3c1644cc57676f3b702c39a45cd 100644 (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
index bdd44e0a2f1ff0fd360780fc370b6016de5c5f3c..0c0591e7eb6beee47a169a105b7f4a7e09d21518 100644 (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) {
index 37965789e081fc454d9f91f3a9188ed7272f25f6..7b012c50f6e9db32b28760124ebb2e813cb7fa62 100644 (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"
   }
index 10b8e5531a884528fc8eaf5e93127b277c00d042..01b0c62c3b5e9842ef71b693b85ed335410f81cf 100644 (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
index 3a958901a240e8238c73fc7763af3d291c58e121..83b5165679fe43ffc3ef5e9326a7ced5e7c834f1 100644 (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];
index 09f84fa552a13d2a7c0d94b30f6ca3ed10853307..a05a18263ec87d44beef44b1e5058a9bfc855bd3 100644 (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)
index eb647435ac97ba4d008da34f631f376dd2d69532..3e5f6f0ff7420df8adffc1b6939a975b026d450f 100644 (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--
-
--- Set magic quotes runtime to 1:  --
-
-Deprecated: Function set_magic_quotes_runtime() is deprecated in %s on line %d
-bool(true)
+Deprecated: Function get_magic_quotes_runtime() is deprecated in %s on line %d
 
--- 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===
\ No newline at end of file
+Fatal error: set_magic_quotes_runtime(): magic_quotes_runtime is not supported anymore in Unknown on line 0
+
+
index 2ac4d20b1f7a2d2cabb7eea98ff78eccd965a860..8967d18c4f094dd7bea877f385eb43d49f1a0c82 100644 (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===
index d6eafd2e5240fed3bbd857d3a9a25feb79687802..c16c2706a77a4b35fd7880f7c15a26dac7830e3d 100644 (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===
index 038068249effa2c720ddfcc39512f7a6050ea5d5..548a67345f996a18483732433e5aab8a01a50f7a 100644 (file)
Binary files a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt and b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt differ
index cd83854f432228501b7d899899a1b8ba6fd82d78..63e907a5af2b41fd5f9e8f221c4160411cbe1038 100644 (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
index 565c11bbc8dda9b4576abe72d956e9d737d805d3..2501ff092ced412741197ffe9c0d79cbf40b05e6 100644 (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) "¡¢¡£¡¤"