Annotation of embedaddon/php/sapi/cgi/tests/006.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: syntax check
! 3: --SKIPIF--
! 4: <?php include "skipif.inc"; ?>
! 5: --INI--
! 6: display_errors=stdout
! 7: --FILE--
! 8: <?php
! 9: include "include.inc";
! 10:
! 11: $php = get_cgi_path();
! 12: reset_env_vars();
! 13:
! 14: $filename = dirname(__FILE__)."/006.test.php";
! 15:
! 16: $code = '
! 17: <?php
! 18:
! 19: $test = "var";
! 20:
! 21: class test {
! 22: private $var;
! 23: }
! 24:
! 25: echo test::$var;
! 26:
! 27: ?>
! 28: ';
! 29:
! 30: file_put_contents($filename, $code);
! 31:
! 32: var_dump(`"$php" -n -l "$filename"`);
! 33: var_dump(`"$php" -n -l some.unknown`);
! 34:
! 35: $code = '
! 36: <?php
! 37:
! 38: class test
! 39: private $var;
! 40: }
! 41:
! 42: ?>
! 43: ';
! 44:
! 45: file_put_contents($filename, $code);
! 46:
! 47: var_dump(`"$php" -n -l "$filename" 2>/dev/null`);
! 48:
! 49: @unlink($filename);
! 50:
! 51: echo "Done\n";
! 52: ?>
! 53: --EXPECTF--
! 54: string(%d) "No syntax errors detected in %s006.test.php
! 55: "
! 56: string(%d) "No input file specified.
! 57: "
! 58: string(%d) "<br />
! 59: <b>Parse error</b>: %s expecting %s{%s in <b>%s006.test.php</b> on line <b>5</b><br />
! 60: Errors parsing %s006.test.php
! 61: "
! 62: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>