pajoye                                   Thu, 28 Jan 2010 00:37:20 +0000

Revision: http://svn.php.net/viewvc?view=revision&revision=294129

Log:
- more EOL fixes, don't use expectf

Changed paths:
    U   php/php-src/branches/PHP_5_3/ext/standard/tests/file/fflush_basic.phpt
    U   php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_basic1.phpt
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_basic2-win32.phpt
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation1-win32.phpt
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation3-win32.phpt
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation4.phpt
    U   
php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation5-win32.phpt
    U   php/php-src/branches/PHP_5_3/ext/standard/tests/file/file.inc
    U   php/php-src/trunk/ext/standard/tests/file/fgetss_basic1.phpt
    U   php/php-src/trunk/ext/standard/tests/file/fgetss_variation1-win32.phpt
    U   php/php-src/trunk/ext/standard/tests/file/fgetss_variation3-win32.phpt
    U   php/php-src/trunk/ext/standard/tests/file/fgetss_variation4.phpt
    U   php/php-src/trunk/ext/standard/tests/file/fgetss_variation5-win32.phpt

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/file/fflush_basic.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/file/fflush_basic.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/fflush_basic.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -20,6 +20,7 @@
 $file_handle = fopen($filename, "w");
 if($file_handle == false)
   exit("Error:failed to open file $filename");
+
 if(substr(PHP_OS, 0, 3) == "WIN")  {
 	$data = str_replace("\r",'', $data);
 }

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_basic1.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_basic1.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_basic1.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -22,7 +22,9 @@
 <html> html </html> <?php echo "php"; ?>
 EOT;

-
+if(substr(PHP_OS, 0, 3) == "WIN")  {
+	$string_with_tags = str_replace("\r",'', $string_with_tags);
+}
 /* try reading the file opened in different modes of reading */
 $file_modes = array("r","rb", "rt","r+", "r+b", "r+t");

@@ -62,7 +64,7 @@

 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing fgetss() : Basic operations ***

 -- Testing fgetss() with file opened using r mode --

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_basic2-win32.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_basic2-win32.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_basic2-win32.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -29,7 +29,9 @@
 is a heredoc string. <pg>ksklnm@@$$&$&^%&^%&^%&</pg>
 <html> html </html> <?php echo "php"; ?>
 EOT;
-
+if(substr(PHP_OS, 0, 3) == "WIN")  {
+	$string_with_tags = str_replace("\r",'', $string_with_tags);
+}
 $filename = dirname(__FILE__)."/fgetss_basic2.tmp";

 /* try reading the file opened in different modes of reading */

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation1-win32.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation1-win32.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation1-win32.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -36,6 +36,10 @@
 this is the line with \n character.
 EOT;

+if(substr(PHP_OS, 0, 3) == "WIN")  {
+	$string_with_tags = str_replace("\r",'', $string_with_tags);
+}
+
 $filename = dirname(__FILE__)."/fgetss_variation1.tmp";

 /* try reading the file opened in different modes of reading */
@@ -73,7 +77,7 @@

 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing fgetss() : usage variations ***

 -- Testing fgetss() with file opened using w mode --

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation3-win32.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation3-win32.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation3-win32.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -35,6 +35,10 @@
 this is the line with \n character.
 EOT;

+if(substr(PHP_OS, 0, 3) == "WIN")  {
+	$string_with_tags = str_replace("\r",'', $string_with_tags);
+}
+
 $filename = dirname(__FILE__)."/fgetss_variation3.tmp";

 /* try reading the file opened in different modes of reading */
@@ -76,7 +80,7 @@

 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing fgetss() : usage variations ***

 -- Testing fgetss() with file opened using w+ mode --

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation4.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation4.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation4.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -1,5 +1,10 @@
 --TEST--
 Test fgetss() function : usage variations - read  modes, file pointer at EOF
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) == "WIN")
+  die("skip not for Windows");
+?>
 --FILE--
 <?php
 /*

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation5-win32.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation5-win32.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/fgetss_variation5-win32.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -33,6 +33,9 @@
 this text contains some html tags <body> body </body> <br> br </br>
 this is the line with \n character.
 EOT;
+if(substr(PHP_OS, 0, 3) == "WIN")  {
+	$string_with_tags = str_replace("\r",'', $string_with_tags);
+}

 $filename = dirname(__FILE__)."/fgetss_variation5.tmp";

@@ -77,7 +80,7 @@

 echo "Done\n";
 ?>
---EXPECTF--
+--EXPECT--
 *** Testing fgetss() : usage variations ***

 -- Testing fgetss() with file opened using w+ mode --

Modified: php/php-src/branches/PHP_5_3/ext/standard/tests/file/file.inc
===================================================================
--- php/php-src/branches/PHP_5_3/ext/standard/tests/file/file.inc	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/branches/PHP_5_3/ext/standard/tests/file/file.inc	2010-01-28 00:37:20 UTC (rev 294129)
@@ -347,16 +347,16 @@
      filled => total files filled, always returned as 1
      perms_changed => total files permission changed
 */
-function create_links( $file_path,
-		       $filename,
-                       $link_count = 1,
-                       $link_type = "soft",
-                       $link_size = 1024,
-                       $link_name_prefix = "link",
-                       $link_name_suffix = 1,
-                       $link_file_content = "text",
-                       $link_perms = 0755,
-                       $link_file_extension = ".tmp"
+function create_links($file_path,
+                      $filename,
+                      $link_count = 1,
+                      $link_type = "soft",
+                      $link_size = 1024,
+                      $link_name_prefix = "link",
+                      $link_name_suffix = 1,
+                      $link_file_content = "text",
+                      $link_perms = 0755,
+                      $link_file_extension = ".tmp"
                      )
 {
   $return_value = array('created' => 0, 'filled' => 0, 'perms_changed' => 0);

Modified: php/php-src/trunk/ext/standard/tests/file/fgetss_basic1.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/file/fgetss_basic1.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/trunk/ext/standard/tests/file/fgetss_basic1.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -22,7 +22,9 @@
 <html> html </html> <?php echo "php"; ?>
 EOT;

-
+if(substr(PHP_OS, 0, 3) == "WIN")  {
+	$string_with_tags = str_replace("\r",'', $string_with_tags);
+}
 /* try reading the file opened in different modes of reading */
 $file_modes = array("r","rb", "rt","r+", "r+b", "r+t");


Modified: php/php-src/trunk/ext/standard/tests/file/fgetss_variation1-win32.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/file/fgetss_variation1-win32.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/trunk/ext/standard/tests/file/fgetss_variation1-win32.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -36,6 +36,10 @@
 this is the line with \n character.
 EOT;

+if(substr(PHP_OS, 0, 3) == "WIN")  {
+	$string_with_tags = str_replace("\r",'', $string_with_tags);
+}
+
 $filename = dirname(__FILE__)."/fgetss_variation1.tmp";

 /* try reading the file opened in different modes of reading */

Modified: php/php-src/trunk/ext/standard/tests/file/fgetss_variation3-win32.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/file/fgetss_variation3-win32.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/trunk/ext/standard/tests/file/fgetss_variation3-win32.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -35,6 +35,10 @@
 this is the line with \n character.
 EOT;

+if(substr(PHP_OS, 0, 3) == "WIN")  {
+	$string_with_tags = str_replace("\r",'', $string_with_tags);
+}
+
 $filename = dirname(__FILE__)."/fgetss_variation3.tmp";

 /* try reading the file opened in different modes of reading */

Modified: php/php-src/trunk/ext/standard/tests/file/fgetss_variation4.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/file/fgetss_variation4.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/trunk/ext/standard/tests/file/fgetss_variation4.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -1,5 +1,10 @@
 --TEST--
-Test fgetss() function : usage variations - read  modes, file pointer at EOF(bug#42126)
+Test fgetss() function : usage variations - read  modes, file pointer at EOF
+--SKIPIF--
+<?php
+if(substr(PHP_OS, 0, 3) == "WIN")
+  die("skip not for Windows");
+?>
 --FILE--
 <?php
 /*

Modified: php/php-src/trunk/ext/standard/tests/file/fgetss_variation5-win32.phpt
===================================================================
--- php/php-src/trunk/ext/standard/tests/file/fgetss_variation5-win32.phpt	2010-01-28 00:14:49 UTC (rev 294128)
+++ php/php-src/trunk/ext/standard/tests/file/fgetss_variation5-win32.phpt	2010-01-28 00:37:20 UTC (rev 294129)
@@ -33,6 +33,9 @@
 this text contains some html tags <body> body </body> <br> br </br>
 this is the line with \n character.
 EOT;
+if(substr(PHP_OS, 0, 3) == "WIN")  {
+	$string_with_tags = str_replace("\r",'', $string_with_tags);
+}

 $filename = dirname(__FILE__)."/fgetss_variation5.tmp";

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to