summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2010-01-28 00:37:20 +0000
committerPierre Joye <pajoye@php.net>2010-01-28 00:37:20 +0000
commit61274a0570b3e725dc5b3c7a51e1498289712469 (patch)
tree4cf072f3e66caabb6039c1d2e154dab7f9c7f8d4 /ext
parent81ac81c494673b79cd4c31c944ab9e2081b80c16 (diff)
downloadphp-git-61274a0570b3e725dc5b3c7a51e1498289712469.tar.gz
- more EOL fixes, don't use expectf
Diffstat (limited to 'ext')
-rwxr-xr-xext/standard/tests/file/fflush_basic.phpt1
-rw-r--r--ext/standard/tests/file/fgetss_basic1.phpt6
-rw-r--r--ext/standard/tests/file/fgetss_basic2-win32.phpt4
-rw-r--r--ext/standard/tests/file/fgetss_variation1-win32.phpt6
-rw-r--r--ext/standard/tests/file/fgetss_variation3-win32.phpt6
-rw-r--r--ext/standard/tests/file/fgetss_variation4.phpt5
-rw-r--r--ext/standard/tests/file/fgetss_variation5-win32.phpt5
-rw-r--r--ext/standard/tests/file/file.inc20
8 files changed, 37 insertions, 16 deletions
diff --git a/ext/standard/tests/file/fflush_basic.phpt b/ext/standard/tests/file/fflush_basic.phpt
index 7e8cba7188..f375c4f079 100755
--- a/ext/standard/tests/file/fflush_basic.phpt
+++ b/ext/standard/tests/file/fflush_basic.phpt
@@ -20,6 +20,7 @@ $filename = "$file_path/fflush_basic.tmp";
$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);
}
diff --git a/ext/standard/tests/file/fgetss_basic1.phpt b/ext/standard/tests/file/fgetss_basic1.phpt
index ab9eae0be2..4c5881d588 100644
--- a/ext/standard/tests/file/fgetss_basic1.phpt
+++ b/ext/standard/tests/file/fgetss_basic1.phpt
@@ -22,7 +22,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);
+}
/* 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 @@ for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing fgetss() : Basic operations ***
-- Testing fgetss() with file opened using r mode --
diff --git a/ext/standard/tests/file/fgetss_basic2-win32.phpt b/ext/standard/tests/file/fgetss_basic2-win32.phpt
index 5a87b4c039..9187fe532a 100644
--- a/ext/standard/tests/file/fgetss_basic2-win32.phpt
+++ b/ext/standard/tests/file/fgetss_basic2-win32.phpt
@@ -29,7 +29,9 @@ $string_with_tags = <<<EOT
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 */
diff --git a/ext/standard/tests/file/fgetss_variation1-win32.phpt b/ext/standard/tests/file/fgetss_variation1-win32.phpt
index dc3ee930c7..0aca5d3760 100644
--- a/ext/standard/tests/file/fgetss_variation1-win32.phpt
+++ b/ext/standard/tests/file/fgetss_variation1-win32.phpt
@@ -36,6 +36,10 @@ 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_variation1.tmp";
/* try reading the file opened in different modes of reading */
@@ -73,7 +77,7 @@ for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing fgetss() : usage variations ***
-- Testing fgetss() with file opened using w mode --
diff --git a/ext/standard/tests/file/fgetss_variation3-win32.phpt b/ext/standard/tests/file/fgetss_variation3-win32.phpt
index ea8ee2f8c6..7539b36876 100644
--- a/ext/standard/tests/file/fgetss_variation3-win32.phpt
+++ b/ext/standard/tests/file/fgetss_variation3-win32.phpt
@@ -35,6 +35,10 @@ 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_variation3.tmp";
/* try reading the file opened in different modes of reading */
@@ -76,7 +80,7 @@ for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing fgetss() : usage variations ***
-- Testing fgetss() with file opened using w+ mode --
diff --git a/ext/standard/tests/file/fgetss_variation4.phpt b/ext/standard/tests/file/fgetss_variation4.phpt
index 134a9652ab..6c201d1a9e 100644
--- a/ext/standard/tests/file/fgetss_variation4.phpt
+++ b/ext/standard/tests/file/fgetss_variation4.phpt
@@ -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
/*
diff --git a/ext/standard/tests/file/fgetss_variation5-win32.phpt b/ext/standard/tests/file/fgetss_variation5-win32.phpt
index d806ddd47d..cedc7b98da 100644
--- a/ext/standard/tests/file/fgetss_variation5-win32.phpt
+++ b/ext/standard/tests/file/fgetss_variation5-win32.phpt
@@ -33,6 +33,9 @@ this is a line with more than eighty character,want to check line splitting corr
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 @@ for($mode_counter = 0; $mode_counter < count($file_modes); $mode_counter++) {
echo "Done\n";
?>
---EXPECTF--
+--EXPECT--
*** Testing fgetss() : usage variations ***
-- Testing fgetss() with file opened using w+ mode --
diff --git a/ext/standard/tests/file/file.inc b/ext/standard/tests/file/file.inc
index efb425ca42..c0f86e7c3f 100644
--- a/ext/standard/tests/file/file.inc
+++ b/ext/standard/tests/file/file.inc
@@ -347,16 +347,16 @@ function create_files( $file_path,
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);