diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2011-09-17 21:03:28 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2011-09-17 21:03:28 +0000 |
| commit | 8d4f176f509e1aaf3aa6f37a632f688ed77fe7b9 (patch) | |
| tree | 7a4829cd346eed960d52875592b4f03d02d2734d /test/functional/expected | |
| parent | 27b584a0d24cd60e597d5d2ade889ec75b858356 (diff) | |
| download | docutils-8d4f176f509e1aaf3aa6f37a632f688ed77fe7b9.tar.gz | |
"code" option of the "include" directive, tests
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@7129 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'test/functional/expected')
5 files changed, 58 insertions, 8 deletions
diff --git a/test/functional/expected/math_output_mathml.xhtml b/test/functional/expected/math_output_mathml.xhtml index bc97875f1..59f6ca686 100644 --- a/test/functional/expected/math_output_mathml.xhtml +++ b/test/functional/expected/math_output_mathml.xhtml @@ -205,7 +205,7 @@ physical system changes in time.</p> <p>Cases with the <a class="reference external" href="ftp://ftp.ams.org/ams/doc/amsmath/short-math-guide.pdf">AMSmath</a> <tt class="docutils literal">cases</tt> environment (not (yet) supported by HTML writers with <tt class="docutils literal"><span class="pre">--math-output=MathML</span></tt>):</p> <div class="system-message"> -<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/math.txt</tt>, line 108)</p> +<p class="system-message-title">System Message: ERROR/3 (<tt class="docutils">functional/input/data/math.txt</tt>, line 107)</p> <p> Environment not supported! Supported environment: "matrix".</p> <pre class="literal-block"> diff --git a/test/functional/expected/standalone_rst_html4css1.html b/test/functional/expected/standalone_rst_html4css1.html index 414ade49f..46dc78ca0 100644 --- a/test/functional/expected/standalone_rst_html4css1.html +++ b/test/functional/expected/standalone_rst_html4css1.html @@ -849,9 +849,10 @@ Pygments highlighter.)</p> <pre class="code python literal-block"> print 'This is Python code.' </pre> -<p>There is an option for line numbers with optional start value:</p> +<p>The <tt class="docutils literal"><span class="pre">:number-lines:</span></tt> option (with optional start value) generates line +numbers:</p> <pre class="code python literal-block"> -<span class="l n"> 8 </span># print integers from 0 to 9: +<span class="ln"> 8 </span># print integers from 0 to 9: <span class="ln"> 9 </span>for i in range(10): <span class="ln">10 </span> print i </pre> @@ -863,6 +864,12 @@ known) or as base for special code roles, e.g.,</p> Docutils uses LaTeX syntax for math directives and roles: <tt class="code latex tex docutils literal">\alpha = f(x)</tt> prints <math xmlns="http://www.w3.org/1998/Math/MathML"> <mrow><mi>α</mi><mo>=</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow></math>.</blockquote> +<p>The <tt class="docutils literal">:code:</tt> option of the <cite>include</cite> directive sets the included content +as a code block, here the rst file <tt class="docutils literal">header_footer.txt</tt> with line numbers:</p> +<pre class="code rst literal-block"> +<span class="ln">1 </span>.. header:: Document header +<span class="ln">2 </span>.. footer:: Document footer +</pre> </div> </div> <div class="section" id="substitution-definitions"> diff --git a/test/functional/expected/standalone_rst_latex.tex b/test/functional/expected/standalone_rst_latex.tex index ac8a5b2da..df158bb2a 100644 --- a/test/functional/expected/standalone_rst_latex.tex +++ b/test/functional/expected/standalone_rst_latex.tex @@ -1388,10 +1388,11 @@ print~'This~is~Python~code.' } \end{quote} -There is an option for line numbers with optional start value: +The \texttt{:number-lines:} option (with optional start value) generates line +numbers: % \begin{quote}{\ttfamily \raggedright \noindent -\DUrole{l}{\DUrole{n}{~8~}}\#~print~integers~from~0~to~9:\\ +\DUrole{ln}{~8~}\#~print~integers~from~0~to~9:\\ \DUrole{ln}{~9~}for~i~in~range(10):\\ \DUrole{ln}{10~}~~~~print~i } @@ -1410,6 +1411,15 @@ Docutils uses LaTeX syntax for math directives and roles: \end{quote} +The \texttt{:code:} option of the \DUroletitlereference{include} directive sets the included content +as a code block, here the rst file \texttt{header\_footer.txt} with line numbers: +% +\begin{quote}{\ttfamily \raggedright \noindent +\DUrole{ln}{1~}..~header::~Document~header\\ +\DUrole{ln}{2~}..~footer::~Document~footer +} +\end{quote} + %___________________________________________________________________________ diff --git a/test/functional/expected/standalone_rst_pseudoxml.txt b/test/functional/expected/standalone_rst_pseudoxml.txt index 58347116d..2170de860 100644 --- a/test/functional/expected/standalone_rst_pseudoxml.txt +++ b/test/functional/expected/standalone_rst_pseudoxml.txt @@ -1633,7 +1633,11 @@ <literal_block classes="code python" xml:space="preserve"> print 'This is Python code.' <paragraph> - There is an option for line numbers with optional start value: + The + <literal> + :number-lines: + option (with optional start value) generates line + numbers: <literal_block classes="code python" xml:space="preserve"> <inline classes="ln"> 8 @@ -1662,6 +1666,25 @@ \alpha = f(x) . <target ids="pygments" names="pygments" refuri="http://pygments.org/"> + <paragraph> + The + <literal> + :code: + option of the + <title_reference> + include + directive sets the included content + as a code block, here the rst file + <literal> + header_footer.txt + with line numbers: + <literal_block classes="code rst" source="functional/input/data/header_footer.txt" xml:space="preserve"> + <inline classes="ln"> + 1 + .. header:: Document header + <inline classes="ln"> + 2 + .. footer:: Document footer <section ids="substitution-definitions" names="substitution\ definitions"> <title auto="1" refid="id65"> <generated classes="sectnum"> diff --git a/test/functional/expected/standalone_rst_xetex.tex b/test/functional/expected/standalone_rst_xetex.tex index 670da275d..c3d35cb97 100644 --- a/test/functional/expected/standalone_rst_xetex.tex +++ b/test/functional/expected/standalone_rst_xetex.tex @@ -1387,10 +1387,11 @@ print~'This~is~Python~code.' } \end{quote} -There is an option for line numbers with optional start value: +The \texttt{:number-lines:} option (with optional start value) generates line +numbers: % \begin{quote}{\ttfamily \raggedright \noindent -\DUrole{l}{\DUrole{n}{~8~}}\#~print~integers~from~0~to~9:\\ +\DUrole{ln}{~8~}\#~print~integers~from~0~to~9:\\ ~\DUrole{ln}{~9~}for~i~in~range(10):\\ ~\DUrole{ln}{10~}~~~~print~i } @@ -1409,6 +1410,15 @@ Docutils uses LaTeX syntax for math directives and roles: \end{quote} +The \texttt{:code:} option of the \DUroletitlereference{include} directive sets the included content +as a code block, here the rst file \texttt{header\_footer.txt} with line numbers: +% +\begin{quote}{\ttfamily \raggedright \noindent +\DUrole{ln}{1~}..~header::~Document~header\\ +~\DUrole{ln}{2~}..~footer::~Document~footer +} +\end{quote} + %___________________________________________________________________________ |
