]> granicus.if.org Git - php/commitdiff
- add win32 version of the test, damned error msg with eol in them
authorPierre Joye <pajoye@php.net>
Sun, 24 Jan 2010 17:53:10 +0000 (17:53 +0000)
committerPierre Joye <pajoye@php.net>
Sun, 24 Jan 2010 17:53:10 +0000 (17:53 +0000)
ext/standard/tests/streams/bug49936_win32.phpt [new file with mode: 0644]

diff --git a/ext/standard/tests/streams/bug49936_win32.phpt b/ext/standard/tests/streams/bug49936_win32.phpt
new file mode 100644 (file)
index 0000000..4db4a50
--- /dev/null
@@ -0,0 +1,30 @@
+--TEST--\r
+Bug #49936 (crash with ftp stream in php_stream_context_get_option())\r
+--SKIPIF--\r
+<?php\r
+if( substr(PHP_OS, 0, 3) != "WIN" )\r
+  die("skip. Do run on Windows only");\r
+?>\r
+--INI--\r
+default_socket_timeout=2\r
+--FILE--\r
+<?php\r
+\r
+$dir = 'ftp://your:self@localhost/';\r
+\r
+var_dump(opendir($dir));\r
+var_dump(opendir($dir));\r
+\r
+?>\r
+--EXPECTF--\r
+Warning: opendir(): connect() failed: %s\r
+ in %s on line %d\r
+\r
+Warning: opendir(ftp://...@localhost/): failed to open dir: operation failed in %s on line %d\r
+bool(false)\r
+\r
+Warning: opendir(): connect() failed: %s\r
+ in %s on line %d\r
+\r
+Warning: opendir(ftp://...@localhost/): failed to open dir: operation failed in %s on line %d\r
+bool(false)\r