cvs: php4 /ext/standard/tests/network bug20134.phpt
| From: | Wez Furlong | Date: | Thu, 14 Nov 2002 14:56:35 +0000 |
| Subject: | cvs: php4 /ext/standard/tests/network bug20134.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-16147@lists.php.net to get a copy of this message | ||
wez Thu Nov 14 09:56:35 2002 EDT
Added files:
/php4/ext/standard/tests/network bug20134.phpt
Log:
Add a test case for this "bug" # 20134.
I'm not sure that this test is actually useful, so I'm not adding
it to the branch.
Index: php4/ext/standard/tests/network/bug20134.phpt
+++ php4/ext/standard/tests/network/bug20134.phpt
--TEST--
Bug #20134 UDP reads from invalid ports
--FILE--
<?php
# vim600:syn=php:
$fp = fsockopen("udp://localhost", 65534, $errno, $errstr);
if (!$fp) {
/* UDP will never cause a connection error, as it is
* a connection-LESS protocol */
echo "ERROR: $errno - $errstr<br>\n";
}
else {
/* Likewise, writes will always appear to succeed */
$x = fwrite($fp,"\n");
var_dump($x);
/* But reads should always fail */
$content = fread($fp, 40);
var_dump($content);
fclose($fp);
}
?>
--EXPECT--
int(1)
string(0) ""