Annotation of embedaddon/php/sapi/cli/tests/013.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: running PHP code before and after processing input lines with -B and -E
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__)."/013.test.txt";
16: file_put_contents($filename_txt, "test\nfile\ncontents\n");
17:
18: var_dump(`cat "$filename_txt" | "$php" -n -B 'var_dump("start");'`);
19: var_dump(`cat "$filename_txt" | "$php" -n -E 'var_dump("end");'`);
20: var_dump(`cat "$filename_txt" | "$php" -n -B 'var_dump("start");' -E 'var_dump("end");'`);
21:
22: @unlink($filename_txt);
23:
24: echo "Done\n";
25: ?>
26: --EXPECTF--
27: string(18) "string(5) "start"
28: "
29: string(16) "string(3) "end"
30: "
31: string(34) "string(5) "start"
32: string(3) "end"
33: "
34: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>