diff options
Diffstat (limited to 'sapi/phpdbg/tests')
| -rw-r--r-- | sapi/phpdbg/tests/include_once.phpt | 16 | ||||
| -rw-r--r-- | sapi/phpdbg/tests/set_exception_handler.phpt | 19 | ||||
| -rw-r--r-- | sapi/phpdbg/tests/stdin_001.phpt | 25 |
3 files changed, 60 insertions, 0 deletions
diff --git a/sapi/phpdbg/tests/include_once.phpt b/sapi/phpdbg/tests/include_once.phpt new file mode 100644 index 0000000000..0a00e04cde --- /dev/null +++ b/sapi/phpdbg/tests/include_once.phpt @@ -0,0 +1,16 @@ +--TEST-- +include_once must include only once +--PHPDBG-- +r +q +--EXPECTF-- +[Successful compilation of %s] +prompt> 1 +[Script ended normally] +prompt> +--FILE-- +<?php + +include_once __DIR__.'/include.inc'; +include_once __DIR__.'/include.inc'; + diff --git a/sapi/phpdbg/tests/set_exception_handler.phpt b/sapi/phpdbg/tests/set_exception_handler.phpt new file mode 100644 index 0000000000..7d4d4faca0 --- /dev/null +++ b/sapi/phpdbg/tests/set_exception_handler.phpt @@ -0,0 +1,19 @@ +--TEST-- +set_exception_handler() in phpdbg +--PHPDBG-- +r +c +q +--EXPECTF-- +[Successful compilation of %s] +prompt> [Uncaught Exception in %s on line 4: test] +>00004: throw new Exception("test"); + 00005: +prompt> EX +[Script ended normally] +prompt> +--FILE-- +<?php + +set_exception_handler(function () { print "EX\n"; }); +throw new Exception("test"); diff --git a/sapi/phpdbg/tests/stdin_001.phpt b/sapi/phpdbg/tests/stdin_001.phpt new file mode 100644 index 0000000000..0bc940caef --- /dev/null +++ b/sapi/phpdbg/tests/stdin_001.phpt @@ -0,0 +1,25 @@ +--TEST-- +Test stdin input with breakpoints +--PHPDBG-- +stdin foo +<?php + +echo "Hello, world!\n"; +foo +b 3 +r +c +r +q +--EXPECTF-- +prompt> [Successful compilation of stdin input] +prompt> [Breakpoint #0 added at -:3] +prompt> [Breakpoint #0 at -:3, hits: 1] +>00003: echo "Hello, world!\n"; + 00004: +prompt> Hello, world! +[Script ended normally] +prompt> [Breakpoint #0 at -:3, hits: 1] +>00003: echo "Hello, world!\n"; + 00004: +prompt>
\ No newline at end of file |
