summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPaul Wicking <paul.wicking@qt.io>2020-08-13 15:07:59 +0200
committerPaul Wicking <paul.wicking@qt.io>2020-08-19 12:40:18 +0200
commite64ee1f40853220186cbd6f37972905e3b4fb613 (patch)
tree8e230fa557df80f709aa8cfd4e792a14cbfc88aa /tests
parent8da588070a19e128aaf327d13c91524a45db6d07 (diff)
QDoc: Update expected output test
Add most of the commands that aren't tested. Task-number: QTBUG-71176 Change-Id: I748250ecfa390f8d71b702077e9cbce836dd964c Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml69
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml70
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html63
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc112
-rw-r--r--tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp8
5 files changed, 319 insertions, 3 deletions
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml
new file mode 100644
index 000000000..d664dd72e
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<db:article xmlns:db="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.2" xml:lang="en">
+<db:info>
+<db:title>Exhaustive testing of QDoc commands</db:title>
+<db:productname>OutputFromQDocFiles</db:productname>
+<db:edition>OutputFromQDocFiles - A test project for QDoc build artifacts</db:edition>
+<db:titleabbrev>A test project for QDoc build artifacts</db:titleabbrev>
+<db:abstract>
+<db:para>This page is a dumping ground for QDoc commands under test.</db:para>
+</db:abstract>
+</db:info>
+<db:section xml:id="this-is-a-section1">
+<db:title>This is a section1</db:title>
+<db:section xml:id="this-is-a-section2">
+<db:title>This is a section2</db:title>
+<db:section xml:id="this-is-a-section3">
+<db:title>This is a section3</db:title>
+<db:section xml:id="this-is-a-section4">
+<db:title>This is a section4</db:title>
+<db:programlisting language="cpp" role="bad">This is bad code
+</db:programlisting>
+<db:para>This text should have a line break riiiiight noooow.</db:para>
+<db:para><db:emphasis role="bold">All your text belong to bold</db:emphasis> ...And this is an examble of only <db:emphasis role="bold">bold</db:emphasis> being, well, bold.</db:para>
+<db:programlisting language="cpp"> ...
+</db:programlisting>
+<db:programlisting language="js">&lt;@comment&gt;// If I knew JavaScript, this is where I would write it.&lt;/@comment&gt;
+</db:programlisting>
+<db:para>And if I knew qmltext, I guess this is where that would go. </db:para>
+<db:title>This a caption</db:title>
+<db:para>Lorem legal ipsum</db:para>
+<db:para><db:footnote>
+<db:para><db:para>This is where I put my footnotes.</db:para>
+</db:para>
+</db:footnote><db:para><db:link xlink:href="https://www.qt.io"/></db:para>
+<db:blockquote><db:para>This is a quotation.</db:para>
+</db:blockquote>
+ &lt;html&gt;&lt;body&gt;This is &lt;b&gt;raw&lt;/b&gt;. Like the &lt;h1&gt;Eddie Murphy&lt;/h1&gt; movie. Just not as funny.&lt;/body&gt;&lt;/html&gt;
+ <db:sidebar><db:para>Look, ma! I made a sidebar!</db:para>
+</db:sidebar>
+<db:informaltable style="generic">
+<db:tr valign="top">
+<db:td>
+<db:para>Table item in a table row</db:para>
+</db:td>
+</db:tr>
+<db:tr valign="top">
+<db:td>
+<db:para>Another item in a different row</db:para>
+</db:td>
+</db:tr>
+</db:informaltable>
+<db:important>
+<db:para>This is really important.</db:para>
+</db:important>
+<db:para>For example, if you have code like</db:para>
+<db:programlisting language="cpp" role="bad">This is old code&lt;@op&gt;.&lt;/@op&gt;
+</db:programlisting>
+<db:para>you can rewrite it as</db:para>
+<db:programlisting language="cpp" role="new">This is &lt;@keyword&gt;new&lt;/@keyword&gt; and shiny&lt;@op&gt;!&lt;/@op&gt;
+</db:programlisting>
+<db:note>
+<db:para>The code above doesn't compile</db:para>
+</db:note>
+<db:para><db:emphasis role="bold">Warning:</db:emphasis> The following commands have yet to be tested: sincelist header index topicref // or just don’t care, remove it image inlineimage printline printto printuntil // what’s the difference between printto and printuntil??? quotefile quotefromfile quotefunction skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</db:para>
+</db:para>
+</db:section>
+</db:section>
+</db:section>
+</db:section></db:article>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml b/tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml
new file mode 100644
index 000000000..147edc711
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<WebXML>
+ <document>
+ <page name="qdoctests-qdocfileoutput-exhaustive.html" href="qdoctests-qdocfileoutput-exhaustive.html" status="active" location="qdoctests-outputfromqdocfiles.qdoc" documented="true" subtype="page" title="Exhaustive testing of QDoc commands" fulltitle="Exhaustive testing of QDoc commands" subtitle="" module="OutputFromQDocFiles" brief="This page is a dumping ground for QDoc commands under test">
+ <contents name="this-is-a-section1" title="This is a section1" level="1"/>
+ <contents name="this-is-a-section2" title="This is a section2" level="2"/>
+ <contents name="this-is-a-section3" title="This is a section3" level="3"/>
+ <contents name="this-is-a-section4" title="This is a section4" level="4"/>
+ <description>
+ <brief>This page is a dumping ground for QDoc commands under test.</brief>
+ <section id="this-is-a-section1">
+ <heading level="1">This is a section1</heading>
+ </section>
+ <section id="this-is-a-section2">
+ <heading level="2">This is a section2</heading>
+ </section>
+ <section id="this-is-a-section3">
+ <heading level="3">This is a section3</heading>
+ </section>
+ <section id="this-is-a-section4">
+ <heading level="4">This is a section4</heading>
+ </section>
+ </description>
+ </page>
+ </document>
+ <badcode>This is bad code</badcode>
+ <para>This text should have a line break riiiiight noooow.</para>
+ <para>
+ <bold>All your text belong to bold</bold> ...And this is an examble of only <bold>bold</bold> being, well, bold.</para>
+ <dots indent="4">...</dots>
+ <para>And if I knew qmltext, I guess this is where that would go. </para>This a caption<legalese>
+ <para>Lorem legal ipsum</para>
+ </legalese>
+ <para>
+ <footnote>
+ <para>This is where I put my footnotes.</para>
+ </footnote>
+ <para>
+ <link raw="https://www.qt.io" href="https://www.qt.io" type="external"/>
+ </para>
+ <quote>
+ <para>This is a quotation.</para>
+ </quote>
+ <raw format="HTML"> &lt;html&gt;&lt;body&gt;This is &lt;b&gt;raw&lt;/b&gt;. Like the &lt;h1&gt;Eddie Murphy&lt;/h1&gt; movie. Just not as funny.&lt;/body&gt;&lt;/html&gt;
+ </raw>
+ <para>Look, ma! I made a sidebar!</para>
+ <table>
+ <row>
+ <item>
+ <para>Table item in a table row</para>
+ </item>
+ </row>
+ <row>
+ <item>
+ <para>Another item in a different row</para>
+ </item>
+ </row>
+ </table>
+ <para>
+ <bold>Important:</bold> This is really important.</para>
+ <para>For example, if you have code like</para>
+ <oldcode>This is old code.</oldcode>
+ <para>you can rewrite it as</para>
+ <newcode>This is new and shiny!</newcode>
+ <para>
+ <bold>Note:</bold> The code above doesn't compile</para>
+ <para>
+ <bold>Warning:</bold> The following commands have yet to be tested: sincelist header index topicref // or just don’t care, remove it image inlineimage printline printto printuntil // what’s the difference between printto and printuntil??? quotefile quotefromfile quotefunction skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</para>
+ </para>
+</WebXML>
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html b/tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html
new file mode 100644
index 000000000..0600e8e1e
--- /dev/null
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+<!-- qdoctests-outputfromqdocfiles.qdoc -->
+ <title>Exhaustive testing of QDoc commands | OutputFromQDocFiles</title>
+</head>
+<body>
+<li id="buildversion">OutputFromQDocFiles - A test project for QDoc build artifacts</li>
+<div class="sidebar">
+<div class="toc">
+<h3><a name="toc">Contents</a></h3>
+<ul>
+<li class="level1"><a href="#this-is-a-section1">This is a section1</a></li>
+<li class="level2"><a href="#this-is-a-section2">This is a section2</a></li>
+<li class="level3"><a href="#this-is-a-section3">This is a section3</a></li>
+<li class="level4"><a href="#this-is-a-section4">This is a section4</a></li>
+</ul>
+</div>
+<div class="sidebar-content" id="sidebar-content"></div></div>
+<h1 class="title">Exhaustive testing of QDoc commands</h1>
+<span class="subtitle"></span>
+<!-- $$$qdoctests-qdocfileoutput-exhaustive.html-description -->
+<div class="descr"> <a name="details"></a>
+<a name="this-is-a-section1"></a>
+<h2 id="this-is-a-section1">This is a section1</h2>
+<a name="this-is-a-section2"></a>
+<h3 id="this-is-a-section2">This is a section2</h3>
+<a name="this-is-a-section3"></a>
+<h4 id="this-is-a-section3">This is a section3</h4>
+<a name="this-is-a-section4"></a>
+<h5 id="this-is-a-section4">This is a section4</h5>
+<pre class="cpp plain">This is bad code</pre>
+<p>This text should have a line break riiiiight <br />
+ noooow.</p>
+<p><b>All your text belong to bold</b> ..&#x2e;And this is an examble of only <b>bold</b> being, well, bold.</p>
+<pre class="cpp"> ...</pre>
+<pre class="js"><span class="comment">// If I knew JavaScript, this is where I would write it.</span></pre>
+<p>And if I knew qmltext, I guess this is where that would go. </p>
+<p class="figCaption">This a caption</p>
+<div class="LegaleseLeft"><p>Lorem legal ipsum</p>
+</div><p></p>
+<!-- <p>This is where I put my footnotes.</p>
+--><p><a href="https://www.qt.io"></a></p>
+<blockquote><p>This is a quotation.</p>
+</blockquote>
+ <html><body>This is <b>raw</b>. Like the <h1>Eddie Murphy</h1> movie. Just not as funny.</body></html>
+ <p>Look, ma! I made a sidebar!</p>
+<div class="table"><table class="generic">
+ <tr valign="top" class="odd"><td >Table item in a table row</td></tr>
+<tr valign="top" class="even"><td >Another item in a different row</td></tr>
+</table></div>
+<p><b>Important: </b>This is really important.</p><p>For example, if you have code like</p>
+<pre class="cpp plain">This is old code.</pre>
+<p>you can rewrite it as</p>
+<pre class="cpp">This is <span class="keyword">new</span> and shiny<span class="operator">!</span></pre>
+<p><b>Note: </b>The code above doesn't compile</p>
+<hr />
+<p><b>Warning:</b> The following commands have yet to be tested: sincelist header index topicref // or just don’t care, remove it image inlineimage printline printto printuntil // what’s the difference between printto and printuntil??? quotefile quotefromfile quotefunction skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</p>
+</div>
+<!-- @@@qdoctests-qdocfileoutput-exhaustive.html -->
+</body>
+</html>
diff --git a/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc b/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
index 36d85fb35..c17a5810b 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
+++ b/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2019 The Qt Company Ltd.
+** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -105,3 +105,113 @@
\li \l {Table of Contents}
\endlist
*/
+
+/*!
+ \page qdoctests-qdocfileoutput-exhaustive.html
+ \title Exhaustive testing of QDoc commands
+ \brief This page is a dumping ground for QDoc commands under test.
+
+ \section1 This is a section1
+ \section2 This is a section2
+ \section3 This is a section3
+ \section4 This is a section4
+ \endsection4
+ \endsection3
+ \endsection2
+ \endsection1
+
+ \badcode
+ This is bad code
+ \endcode
+
+ This text should have a line break riiiiight \br noooow.
+
+ \b{All your text belong to bold}
+ ...And this is an examble of only \b bold being, well, bold.
+
+ \dots
+
+ \js
+ // If I knew JavaScript, this is where I would write it.
+ \endjs
+
+ \qmltext
+ And if I knew qmltext, I guess this is where that would go.
+ \endqmltext
+
+ \caption This a caption
+
+ \legalese
+ Lorem legal ipsum
+ \endlegalese
+
+ \footnote
+ This is where I put my footnotes.
+ \endfootnote
+
+ \link
+ https://www.qt.io
+ \endlink
+
+ \quotation
+ This is a quotation.
+ \endquotation
+
+ \raw HTML
+ <html><body>This is <b>raw</b>. Like the <h1>Eddie Murphy</h1> movie. Just not as funny.</body></html>
+ \endraw
+
+ \sidebar
+ Look, ma! I made a sidebar!
+ \endsidebar
+
+ \table
+ \row \li Table item in a table row
+ \row \li Another item in a different row
+ \endtable
+
+ \granularity
+
+ \important This is really important.
+
+ \oldcode
+ This is old code.
+ \newcode
+ This is new and shiny!
+ \endcode
+
+ \note The code above doesn't compile
+
+ \hr
+
+ \warning The following commands have yet to be tested:
+ sincelist
+ header
+ index
+ topicref // or just don’t care, remove it
+ image
+ inlineimage
+ printline
+ printto
+ printuntil // what’s the difference between printto and printuntil???
+ quotefile
+ quotefromfile
+ quotefunction
+ skipline
+ skipto
+ skipuntil
+ span
+ snippet
+ codeline
+ overload
+ sub
+ sup
+ tableofcontents
+ tt
+ uicontrol
+ endmapref
+ endomit
+ underline
+ unicode
+
+*/
diff --git a/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp b/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
index 517870fda..ab0c9a07a 100644
--- a/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
+++ b/tests/auto/qdoc/generatedoutput/tst_generatedoutput.cpp
@@ -211,6 +211,7 @@ void tst_generatedOutput::htmlFromQDocFile()
testAndCompare("testdata/configs/test.qdocconf",
"qdoctests-qdocfileoutput.html "
"qdoctests-qdocfileoutput-linking.html "
+ "qdoctests-qdocfileoutput-exhaustive.html "
"toc.html");
}
@@ -257,7 +258,8 @@ void tst_generatedOutput::webXmlFromQDocFile()
{
testAndCompare("testdata/configs/webxml_test.qdocconf",
"html/qdoctests-qdocfileoutput.webxml "
- "html/qdoctests-qdocfileoutput-linking.webxml");
+ "html/qdoctests-qdocfileoutput-linking.webxml "
+ "html/qdoctests-qdocfileoutput-exhaustive.webxml");
}
void tst_generatedOutput::webXmlFromCpp()
@@ -288,7 +290,8 @@ void tst_generatedOutput::docBookFromQDocFile()
{
testAndCompare("testdata/configs/docbook_test.qdocconf",
"docbook/qdoctests-qdocfileoutput.xml "
- "docbook/qdoctests-qdocfileoutput-linking.xml");
+ "docbook/qdoctests-qdocfileoutput-linking.xml "
+ "docbook/qdoctests-qdocfileoutput-exhaustive.xml");
}
void tst_generatedOutput::docBookFromCpp()
@@ -323,6 +326,7 @@ void tst_generatedOutput::autoNavigation()
testAndCompare("testdata/configs/tocnavigation.qdocconf",
"qdoctests-qdocfileoutput.html "
"qdoctests-qdocfileoutput-linking.html "
+ "qdoctests-qdocfileoutput-exhaustive.html "
"toc.html");
}