add description of stdout_check/stderr_check
This commit is contained in:
parent
82c329da9e
commit
734abd4fea
@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.12: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.14: http://docutils.sourceforge.net/" />
|
||||
<title>Cmdtest User Guide</title>
|
||||
<style type="text/css">
|
||||
|
||||
@ -870,6 +870,20 @@ in recent versions of JUnit).</dd>
|
||||
<dd>"touch" a file inside the "work directory".
|
||||
The filename is evaluated relative to the current directory at the
|
||||
time of the call.</dd>
|
||||
<dt><tt class="docutils literal">stdout_check()</tt></dt>
|
||||
<dd><p class="first">Will "callback" to the test script, giving the user a chance to inpect STDOUT,
|
||||
and maybe call "assert". Example:</p>
|
||||
<pre class="last literal-block">
|
||||
cmd "seq 0 5 100" do
|
||||
stdout_check do |lines|
|
||||
assert lines.include?(55), "no line '55'"
|
||||
end
|
||||
end
|
||||
</pre>
|
||||
</dd>
|
||||
<dt><tt class="docutils literal">stdout_check()</tt></dt>
|
||||
<dd>Will "callback" to the test script, giving the user a chance to inpect STDERR,
|
||||
and maybe call "assert" (see <tt class="docutils literal">stdout_check()</tt> above).</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div class="section" id="deprecated-helper-functions">
|
||||
@ -898,7 +912,7 @@ time of the call.</dd>
|
||||
<div class="footer">
|
||||
<hr class="footer" />
|
||||
<a class="reference external" href="cmdtest.txt">View document source</a>.
|
||||
Generated on: 2016-11-08.
|
||||
Generated on: 2018-04-12.
|
||||
Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
|
||||
|
||||
</div>
|
||||
|
@ -611,6 +611,20 @@ or in the ``setup`` method.
|
||||
The filename is evaluated relative to the current directory at the
|
||||
time of the call.
|
||||
|
||||
``stdout_check()``
|
||||
Will "callback" to the test script, giving the user a chance to inpect STDOUT,
|
||||
and maybe call "assert". Example::
|
||||
|
||||
cmd "seq 0 5 100" do
|
||||
stdout_check do |lines|
|
||||
assert lines.include?(55), "no line '55'"
|
||||
end
|
||||
end
|
||||
|
||||
``stdout_check()``
|
||||
Will "callback" to the test script, giving the user a chance to inpect STDERR,
|
||||
and maybe call "assert" (see ``stdout_check()`` above).
|
||||
|
||||
Deprecated helper functions
|
||||
+++++++++++++++++++++++++++
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user