Annotation of embedaddon/php/sapi/cli/tests/010.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: executing a file with -F
! 3: --SKIPIF--
! 4: <?php
! 5: include "skipif.inc";
! 6: if (substr(PHP_OS, 0, 3) == 'WIN') {
! 7: die ("skip not for Windows");
! 8: }
! 9: ?>
! 10: --FILE--
! 11: <?php
! 12:
! 13: $php = getenv('TEST_PHP_EXECUTABLE');
! 14:
! 15: $filename = __DIR__."/010.test.php";
! 16: $filename_txt = __DIR__."/010.test.txt";
! 17:
! 18: $code = '
! 19: <?php
! 20: var_dump(fread(STDIN, 10));
! 21: ?>
! 22: ';
! 23:
! 24: file_put_contents($filename, $code);
! 25:
! 26: $txt = '
! 27: test
! 28: hello';
! 29:
! 30: file_put_contents($filename_txt, $txt);
! 31:
! 32: var_dump(`cat "$filename_txt" | "$php" -n -F "$filename"`);
! 33:
! 34: ?>
! 35: ===DONE===
! 36: --CLEAN--
! 37: <?php
! 38: @unlink(__DIR__."/010.test.php");
! 39: @unlink(__DIR__."/010.test.txt");
! 40: ?>
! 41: --EXPECTF--
! 42: string(25) "
! 43: string(10) "test
! 44: hello"
! 45: "
! 46: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>