summaryrefslogtreecommitdiff
path: root/sapi/cli/tests
diff options
context:
space:
mode:
authorReeze Xia <reeze@php.net>2015-03-03 11:25:30 +0800
committerReeze Xia <reeze@php.net>2015-03-03 11:43:23 +0800
commit4e2c87edb34c4f151da6899d523c93b8e8565975 (patch)
tree83e672c254725ab1c8cee64052ce45d3a752d77e /sapi/cli/tests
parent169ac35c66220b7c148dd96e70c691549f188b24 (diff)
downloadphp-git-4e2c87edb34c4f151da6899d523c93b8e8565975.tar.gz
Fixed bug #67741 (auto_prepend_file messes up __LINE__)
This also fixes bug #54081
Diffstat (limited to 'sapi/cli/tests')
-rw-r--r--sapi/cli/tests/bug67741.phpt17
-rw-r--r--sapi/cli/tests/bug67741_stub.inc3
2 files changed, 20 insertions, 0 deletions
diff --git a/sapi/cli/tests/bug67741.phpt b/sapi/cli/tests/bug67741.phpt
new file mode 100644
index 0000000000..df0981443f
--- /dev/null
+++ b/sapi/cli/tests/bug67741.phpt
@@ -0,0 +1,17 @@
+--TEST--
+Bug #67741 (auto_prepend_file messes up __LINE__)
+--INI--
+include_path={PWD}
+auto_prepend_file=bug67741_stub.inc
+--SKIPIF--
+<?php
+include "skipif.inc";
+?>
+--FILE--
+#!/bin/env php
+<?php
+echo "primary lineno: ", __LINE__, "\n";
+?>
+--EXPECT--
+prepend lineno: 2
+primary lineno: 3 \ No newline at end of file
diff --git a/sapi/cli/tests/bug67741_stub.inc b/sapi/cli/tests/bug67741_stub.inc
new file mode 100644
index 0000000000..4d7470ea29
--- /dev/null
+++ b/sapi/cli/tests/bug67741_stub.inc
@@ -0,0 +1,3 @@
+<?php
+echo "prepend lineno: ", __LINE__, "\n";
+?>