diff options
author | Wez Furlong <wez@php.net> | 2002-10-14 02:25:51 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2002-10-14 02:25:51 +0000 |
commit | 39f8d4c9715271a854650b2486936a1cc3eb19f8 (patch) | |
tree | e39ee222a8076036a01abd710eb320a4176196cf | |
parent | be5606504ccb66fd2de10564503d6a36fd0ca9c7 (diff) | |
download | php-git-39f8d4c9715271a854650b2486936a1cc3eb19f8.tar.gz |
Add a sanity check and more verbose output in the case of an error.
-rw-r--r-- | ext/standard/tests/file/userstreams.phpt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ext/standard/tests/file/userstreams.phpt b/ext/standard/tests/file/userstreams.phpt index f71333efd9..f35dbc9e7c 100644 --- a/ext/standard/tests/file/userstreams.phpt +++ b/ext/standard/tests/file/userstreams.phpt @@ -269,15 +269,21 @@ if ($fail_count == 0) { } $fail_count = 0; + fseek($fp, $DATALEN / 2, SEEK_SET); fseek($tf, $DATALEN / 2, SEEK_SET); +if (ftell($fp) != ftell($tf)) { + echo "SEEK: positions do not match!\n"; +} + +$n = 0; while(!feof($fp)) { $uline = fgets($fp, 1024); $rline = fgets($tf, 1024); if ($uline != $rline) { - echo "FGETS: FAIL\nuser=$uline\nreal=$rline\n"; + echo "FGETS: FAIL\niter=$n user=$uline [pos=" . ftell($fp) . "]\nreal=$rline [pos=" . ftell($tf) . "]\n"; $fail_count++; break; } |