Annotation of embedaddon/php/ext/standard/tests/file/php_fd_wrapper_04.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: php://fd wrapper: invalid file descriptor
                      3: --SKIPIF--
                      4: <?php include('skipif.inc'); 
                      5: if(substr(PHP_OS, 0, 3) == "WIN")
                      6:        die("skip Not for Windows");
                      7: 
                      8: //we'd need a release and a test variation for windows, because in debug builds we get this message:
                      9: //Warning: Invalid parameter detected in CRT function '_dup' (f:\dd\vctools\crt_bld\self_x86\crt\src\dup.c:52)
                     10: //I greped the CRT sources and found no function capable of validating a file descriptor
                     11: 
                     12: --FILE--
                     13: <?php
                     14: fopen("php://fd/12", "w");
                     15: 
                     16: echo "\nDone.\n";
                     17: --EXPECTF--
                     18: Warning: fopen(php://fd/12): failed to open stream: Error duping file descriptor 12; possibly it doesn't exist: [9]: %s in %s on line %d
                     19: 
                     20: Done.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>