com web/qa: Add --PHPDBG-- section: phpt_details.php samp le_tests/phpdbg_1.php
| From: | Christoph Michael Becker | Date: | Fri, 12 Oct 2018 07:55:53 +0000 |
| Subject: | com web/qa: Add --PHPDBG-- section: phpt_details.php samp le_tests/phpdbg_1.php | ||
| Groups: | php.qa | ||
| Request: | Send a blank email to php-qa+get-68227@lists.php.net to get a copy of this message | ||
Commit: 2eb4c26646f1a5cacdaf7b10cfa8f3c4fed14db0
Author: Peter Kokot <peterkokot@gmail.com> Wed, 10 Oct 2018 00:27:41 +0200
Committer: Christoph M. Becker <cmbecker69@gmx.de> Fri, 12 Oct 2018 09:55:53 +0200
Parents: 00ddba32293f77f0baa8903fb44af43add859186
Branches: master
Link: http://git.php.net/?p=web/qa.git;a=commitdiff;h=2eb4c26646f1a5cacdaf7b10cfa8f3c4fed14db0
Log:
Add --PHPDBG-- section
Changed paths:
M phpt_details.php
A sample_tests/phpdbg_1.php
Diff:
diff --git a/phpt_details.php b/phpt_details.php
index 5259d1d..4d2b352 100644
--- a/phpt_details.php
+++ b/phpt_details.php
@@ -26,6 +26,7 @@ common_header();
[<a href="#ini_section">--INI--</a>]<br/>
[<a href="#args_section">--ARGS--</a>]<br/>
[<a href="#env_section">--ENV--</a>]<br/>
+[<a href="#phpdbg_section">--PHPDBG--</a>]<br/>
<a href="#file_section">--FILE--</a> | <a
href="#fileeof_section">--FILEEOF--</a> | <a
href="#file_external_section">--FILE_EXTERNAL--</a> | <a
href="#redirecttest_section">--REDIRECTTEST--</a><br/>
[<a href="#cgi_section">--CGI--</a>]<br/>
[<a href="#xfail_section">--XFAIL--</a>]<br/>
@@ -371,6 +372,29 @@ PATH_INFO=/hi</pre></p>
<p><b>Example 1 (full):</b> <a
href="sample_tests/sample018.php">sample018.phpt</a></p>
</dd>
+<dt id="phpdbg_section">--PHPDBG--</dt>
+<dd>
+<p><b>Description:</b><br/>
+This section takes arbitrary phpdbg commands and executes the test file
+according to them as it would be run in the phpdbg prompt.</p>
+<p><b>Required:</b><br/>
+No.</p>
+<p><b>Format:</b><br/>
+arbitrary phpdbg commands</p>
+<p><b>Example 1 (snippet):</b><br/>
+<pre>--PHPDBG--
+b 4
+b del 0
+b 5
+r
+b del 1
+r
+y
+q
+</pre></p>
+<p><b>Example 1 (full):</b> <a
href="sample_tests/phpdbg_1.php">phpdbg_1.phpt</a></p>
+</dd>
+
<dt id="file_section">--FILE--</dt>
<dd>
<p><b>Description:</b><br/>
diff --git a/sample_tests/phpdbg_1.php b/sample_tests/phpdbg_1.php
new file mode 100644
index 0000000..c6e01b6
--- /dev/null
+++ b/sample_tests/phpdbg_1.php
@@ -0,0 +1,51 @@
+<?php
+include("../include/functions.php");
+
+$TITLE = "Sample Test [PHP-QAT: Quality Assurance Team]";
+$SITE_UPDATE = date("D M d H:i:s Y T", filectime(__FILE__));
+
+common_header();
+?>
+
+<div style="padding: 10px">
+<h1>Sample Test: phpdbg_1.phpt</h1>
+<p>Back to "<a href="../phpt_details.php">PHPT Test File
Layout</a>"</p>
+<pre>--TEST--
+Test deleting breakpoints
+--PHPDBG--
+b 4
+b del 0
+b 5
+r
+b del 1
+r
+y
+q
+--EXPECTF--
+[Successful compilation of %s]
+prompt> [Breakpoint #0 added at %s:4]
+prompt> [Deleted breakpoint #0]
+prompt> [Breakpoint #1 added at %s:5]
+prompt> 12
+[Breakpoint #1 at %s:5, hits: 1]
+>00005: echo $i++;
+ 00006: echo $i++;
+ 00007:
+prompt> [Deleted breakpoint #1]
+prompt> Do you really want to restart execution? (type y or n): 1234
+[Script ended normally]
+prompt>
+--FILE--
+<?php
+$i = 1;
+echo $i++;
+echo $i++;
+echo $i++;
+echo $i++;
+</pre>
+<p>Back to "<a href="../phpt_details.php">PHPT Test File
Layout</a>"</p>
+</div>
+
+<?php
+common_footer();
+?>