File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
sapi /
cli /
tests /
010.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:06 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
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>