mirror of
https://github.com/php/php-src.git
synced 2024-12-14 20:33:36 +08:00
Fixed EOF handling in case of reading from file opened in write only mode.
This commit is contained in:
parent
7bb46902f8
commit
11c5577116
@ -84,7 +84,7 @@ int(0)
|
||||
bool(false)
|
||||
bool(false)
|
||||
int(0)
|
||||
bool(true)
|
||||
bool(false)
|
||||
-- File opened in mode : at --
|
||||
bool(true)
|
||||
int(0)
|
||||
@ -150,7 +150,7 @@ int(0)
|
||||
bool(false)
|
||||
bool(false)
|
||||
int(0)
|
||||
bool(true)
|
||||
bool(false)
|
||||
-- File opened in mode : at --
|
||||
bool(true)
|
||||
int(0)
|
||||
|
@ -652,6 +652,7 @@ bool(false)
|
||||
Reading 1000 bytes from file, expecting 0 bytes ... OK
|
||||
int(0)
|
||||
bool(false)
|
||||
|
||||
Done
|
||||
--UEXPECTF--
|
||||
*** Testing fread() : usage variations ***
|
||||
@ -1202,4 +1203,5 @@ bool(false)
|
||||
Reading 1000 bytes from file, expecting 0 bytes ... OK
|
||||
int(0)
|
||||
bool(false)
|
||||
|
||||
Done
|
||||
|
@ -117,117 +117,117 @@ 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 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 @@ 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 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,475 +355,115 @@ 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 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)
|
||||
Done
|
||||
--UEXPECTF--
|
||||
*** Testing fread() : usage variations ***
|
||||
|
||||
-- Testing fread() with file having content of type numeric --
|
||||
-- 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 --
|
||||
-- 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 --
|
||||
-- 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 --
|
||||
-- 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 --
|
||||
-- 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 --
|
||||
-- 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(1137)
|
||||
bool(false)
|
||||
Reading 10 bytes from file, expecting 0 bytes ... OK
|
||||
int(1137)
|
||||
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 --
|
||||
-- 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
|
@ -117,117 +117,117 @@ 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 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 @@ 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 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 @@ 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 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--
|
@ -342,7 +342,7 @@ static size_t php_stdiop_read(php_stream *stream, char *buf, size_t count TSRMLS
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user