Annotation of embedaddon/php/sapi/cli/tests/010-2.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: executing a code with -R
! 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_txt = dirname(__FILE__)."/010.test.txt";
! 16:
! 17: $txt = '
! 18: test
! 19: hello
! 20: ';
! 21:
! 22: file_put_contents($filename_txt, $txt);
! 23:
! 24: var_dump(`cat "$filename_txt" | "$php" -n -R "var_dump(1);"`);
! 25:
! 26: @unlink($filename_txt);
! 27:
! 28: echo "Done\n";
! 29: ?>
! 30: --EXPECTF--
! 31: string(21) "int(1)
! 32: int(1)
! 33: int(1)
! 34: "
! 35: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>