dmitry Wed Jul 25 16:34:27 2007 UTC Modified files: /php-src/main/streams plain_wrapper.c /php-src/ext/standard/tests/file fgets_variation1.phpt fread_variation2.phpt fread_variation4-win32.phpt fread_variation4.phpt Log: Fixed EOF handling in case of reading from file opened in write only mode.
http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.89&r2=1.90&diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.89 php-src/main/streams/plain_wrapper.c:1.90 --- php-src/main/streams/plain_wrapper.c:1.89 Tue Jul 10 20:13:29 2007 +++ php-src/main/streams/plain_wrapper.c Wed Jul 25 16:34:27 2007 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: plain_wrapper.c,v 1.89 2007/07/10 20:13:29 sas Exp $ */ +/* $Id: plain_wrapper.c,v 1.90 2007/07/25 16:34:27 dmitry Exp $ */ #include "php.h" #include "php_globals.h" @@ -342,7 +342,7 @@ ret = read(data->fd, buf, count); } - stream->eof = (ret == 0 || (ret == (size_t)-1 && errno != EWOULDBLOCK && errno != EINTR)); + stream->eof = (ret == 0 || (ret == (size_t)-1 && errno != EWOULDBLOCK && errno != EINTR && errno != EBADF)); } else { #if HAVE_FLUSHIO http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fgets_variation1.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/standard/tests/file/fgets_variation1.phpt diff -u php-src/ext/standard/tests/file/fgets_variation1.phpt:1.3 php-src/ext/standard/tests/file/fgets_variation1.phpt:1.4 --- php-src/ext/standard/tests/file/fgets_variation1.phpt:1.3 Mon Jul 23 10:44:04 2007 +++ php-src/ext/standard/tests/file/fgets_variation1.phpt Wed Jul 25 16:34:27 2007 @@ -84,7 +84,7 @@ bool(false) bool(false) int(0) -bool(true) +bool(false) -- File opened in mode : at -- bool(true) int(0) @@ -150,7 +150,7 @@ bool(false) bool(false) int(0) -bool(true) +bool(false) -- File opened in mode : at -- bool(true) int(0) http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fread_variation2.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/ext/standard/tests/file/fread_variation2.phpt diff -u php-src/ext/standard/tests/file/fread_variation2.phpt:1.3 php-src/ext/standard/tests/file/fread_variation2.phpt:1.4 --- php-src/ext/standard/tests/file/fread_variation2.phpt:1.3 Mon Jul 23 10:44:04 2007 +++ php-src/ext/standard/tests/file/fread_variation2.phpt Wed Jul 25 16:34:27 2007 @@ -652,6 +652,7 @@ Reading 1000 bytes from file, expecting 0 bytes ... OK int(0) bool(false) + Done --UEXPECTF-- *** Testing fread() : usage variations *** @@ -1202,4 +1203,5 @@ Reading 1000 bytes from file, expecting 0 bytes ... OK int(0) bool(false) + Done http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fread_variation4-win32.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/file/fread_variation4-win32.phpt diff -u php-src/ext/standard/tests/file/fread_variation4-win32.phpt:1.1 php-src/ext/standard/tests/file/fread_variation4-win32.phpt:1.2 --- php-src/ext/standard/tests/file/fread_variation4-win32.phpt:1.1 Sun Jul 22 17:38:48 2007 +++ php-src/ext/standard/tests/file/fread_variation4-win32.phpt Wed Jul 25 16:34:27 2007 @@ -117,596 +117,236 @@ bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode ab -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) --- File opened in mode at -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode w -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode wb -- +-- File opened in mode ab -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode wt -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) --- File opened in mode x -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode xb -- +-- File opened in mode at -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode xt -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) - --- Testing fread() with file having content of type text -- --- File opened in mode a -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode ab -- +-- File opened in mode w -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode at -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) --- File opened in mode w -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) -- File opened in mode wb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode wt -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) --- File opened in mode x -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode xb -- +-- File opened in mode wt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode xt -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) - --- Testing fread() with file having content of type text_with_new_line -- --- File opened in mode a -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode ab -- +-- File opened in mode x -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode at -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) --- File opened in mode w -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode wb -- +-- File opened in mode xb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) --- File opened in mode wt -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1137) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1137) -bool(true) --- File opened in mode x -- +-- File opened in mode xt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode xb -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) --- File opened in mode xt -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1137) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1137) -bool(true) -Done ---UEXPECTF-- -*** Testing fread() : usage variations *** --- Testing fread() with file having content of type numeric -- +-- Testing fread() with file having content of type text -- -- File opened in mode a -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode ab -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode at -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) --- File opened in mode w -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode wb -- +-- File opened in mode ab -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode wt -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) --- File opened in mode x -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode xb -- +-- File opened in mode at -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode xt -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) - --- Testing fread() with file having content of type text -- --- File opened in mode a -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode ab -- +-- File opened in mode w -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) -bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) --- File opened in mode at -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) --- File opened in mode w -- --- Reading beyond filesize, expeceted : 1024 bytes -- -int(0) -bool(false) -Reading 1030 bytes from file, expecting 0 bytes ... OK -int(0) -bool(true) --- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- -int(1024) bool(false) -Reading 10 bytes from file, expecting 0 bytes ... OK -int(1024) -bool(true) -- File opened in mode wb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode wt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode x -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode xb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode xt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- Testing fread() with file having content of type text_with_new_line -- -- File opened in mode a -- @@ -715,115 +355,115 @@ bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode ab -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode at -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode w -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode wb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode wt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1137) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1137) -bool(true) +bool(false) -- File opened in mode x -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode xb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode xt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1137) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1137) -bool(true) +bool(false) Done \ No newline at end of file http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/fread_variation4.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/fread_variation4.phpt diff -u php-src/ext/standard/tests/file/fread_variation4.phpt:1.2 php-src/ext/standard/tests/file/fread_variation4.phpt:1.3 --- php-src/ext/standard/tests/file/fread_variation4.phpt:1.2 Sun Jul 22 17:30:27 2007 +++ php-src/ext/standard/tests/file/fread_variation4.phpt Wed Jul 25 16:34:27 2007 @@ -117,117 +117,117 @@ bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode ab -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode at -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode w -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode wb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode wt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode x -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode xb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode xt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- Testing fread() with file having content of type text -- -- File opened in mode a -- @@ -236,117 +236,117 @@ bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode ab -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode at -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode w -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode wb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode wt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode x -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode xb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode xt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- Testing fread() with file having content of type text_with_new_line -- -- File opened in mode a -- @@ -355,116 +355,115 @@ bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode ab -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode at -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode w -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode wb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode wt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode x -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode xb -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) -- File opened in mode xt -- -- Reading beyond filesize, expeceted : 1024 bytes -- int(0) bool(false) Reading 1030 bytes from file, expecting 0 bytes ... OK int(0) -bool(true) +bool(false) -- Reading beyond filesize when file pointer pointing to EOF, expeceted : 0 bytes -- int(1024) bool(false) Reading 10 bytes from file, expecting 0 bytes ... OK int(1024) -bool(true) +bool(false) Done ---UEXPECTF-- \ No newline at end of file
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php