summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThibaut Cuvelier <cuvelier.thibaut@gmail.com>2022-07-03 03:48:07 +0200
committerPaul Wicking <paul.wicking@qt.io>2022-11-09 20:41:52 +0100
commitfddc6a2b14ad3c3c28830ad2623086c32b909f91 (patch)
treeb8dfb7e380df1a22b7cdd37e1f58208558b8f35c /tests
parent1181df0cee3bad68deece5c563bb996c0a8e84c0 (diff)
downloadqttools-fddc6a2b14ad3c3c28830ad2623086c32b909f91.tar.gz
Detect figure captions for bordered images
Include a test case for this macro that is imported from qtbase, and test images and captions. Update expected test results. Change-Id: Icc96b08e6ffbe7b04197ae8857f8977edcedb3e4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml60
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml21
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html15
-rw-r--r--tests/auto/qdoc/generatedoutput/expected_output/tocbreadcrumbs/qdoctests-qdocfileoutput-exhaustive.html15
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/configs/config.qdocconf5
-rw-r--r--tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc37
6 files changed, 145 insertions, 8 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
index 6bd64bb8e..d17600dc4 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/docbook/qdoctests-qdocfileoutput-exhaustive.xml
@@ -49,11 +49,65 @@
<db:note>
<db:para>The code above doesn't compile</db:para>
</db:note>
-<db:warning>
-<db:para>The following commands have yet to be tested: footnote link 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 skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</db:para>
-</db:warning>
</db:section>
</db:section>
</db:section>
</db:section>
+<db:section xml:id="images">
+<db:title>Images</db:title>
+<db:para>An image without any text:</db:para>
+<db:mediaobject>
+<db:imageobject>
+<db:imagedata fileref="images/leonardo-da-vinci.png"/>
+</db:imageobject>
+</db:mediaobject>
+<db:para>An image with just an alternative text:</db:para>
+<db:mediaobject>
+<db:alt>Image alt</db:alt>
+<db:imageobject>
+<db:imagedata fileref="images/leonardo-da-vinci.png"/>
+</db:imageobject>
+</db:mediaobject>
+<db:para>An image with alternative text and 1-atom caption:</db:para>
+<db:figure>
+<db:title>Image caption</db:title>
+<db:mediaobject>
+<db:alt>Image alt</db:alt>
+<db:imageobject>
+<db:imagedata fileref="images/leonardo-da-vinci.png"/>
+</db:imageobject>
+</db:mediaobject>
+</db:figure>
+<db:para>An image with alternative text and 2-atom caption:</db:para>
+<db:figure>
+<db:title>Image caption without bold text</db:title>
+<db:mediaobject>
+<db:alt>Image alt</db:alt>
+<db:imageobject>
+<db:imagedata fileref="images/leonardo-da-vinci.png"/>
+</db:imageobject>
+</db:mediaobject>
+</db:figure>
+<db:para>A bordered image:</db:para>
+<db:mediaobject>
+<db:imageobject>
+<db:imagedata fileref="images/leonardo-da-vinci.png"/>
+</db:imageobject>
+</db:mediaobject>
+<db:para>A bordered image with a caption:</db:para>
+<db:figure>
+<db:title>Screenshot of the System Tray Icon<db:mediaobject>
+<db:imageobject>
+<db:imagedata fileref="images/leonardo-da-vinci.png"/>
+</db:imageobject>
+</db:mediaobject>
+</db:title>
+</db:figure>
+</db:section>
+<db:section xml:id="commands-not-yet-tested">
+<db:title>Commands not yet tested</db:title>
+<db:warning>
+<db:para>The following commands have yet to be tested: footnote link sincelist header index topicref // or just don’t care, remove it inlineimage printline printto printuntil // what’s the difference between printto and printuntil??? quotefile quotefromfile skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</db:para>
+</db:warning>
+</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
index 49a127a4b..a598c1cd6 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml
+++ b/tests/auto/qdoc/generatedoutput/expected_output/html/qdoctests-qdocfileoutput-exhaustive.webxml
@@ -6,6 +6,8 @@
<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"/>
+ <contents name="images" title="Images" level="1"/>
+ <contents name="commands-not-yet-tested" title="Commands not yet tested" level="1"/>
<description>
<brief>This page is a dumping ground for QDoc commands under test.</brief>
<section id="this-is-a-section1">
@@ -53,6 +55,21 @@
<bold>Important:</bold> This is really important.</para>
<para>
<bold>Note:</bold> The code above doesn't compile</para>
- <para>
- <bold>Warning:</bold> The following commands have yet to be tested: footnote link 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 skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</para>
+ <section id="images">
+ <heading level="1">Images</heading>
+ <para>An image without any text:</para>
+ <image href="images/leonardo-da-vinci.png"/>
+ <para>An image with just an alternative text:</para>
+ <image href="images/leonardo-da-vinci.png"/>
+ <para>An image with alternative text and 1-atom caption:</para>
+ <image href="images/leonardo-da-vinci.png"/>Image caption<para>An image with alternative text and 2-atom caption:</para>
+ <image href="images/leonardo-da-vinci.png"/>Image caption without bold text<para>A bordered image:</para>
+ <image href="images/leonardo-da-vinci.png"/>
+ <para>A bordered image with a caption:</para>
+ <image href="images/leonardo-da-vinci.png"/>Screenshot of the System Tray Icon</section>
+ <section id="commands-not-yet-tested">
+ <heading level="1">Commands not yet tested</heading>
+ <para>
+ <bold>Warning:</bold> The following commands have yet to be tested: footnote link sincelist header index topicref // or just don’t care, remove it inlineimage printline printto printuntil // what’s the difference between printto and printuntil??? quotefile quotefromfile skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</para>
+ </section>
</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
index 9175d2ccc..638be39b3 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/qdoctests-qdocfileoutput-exhaustive.html
@@ -15,6 +15,8 @@
<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>
+<li class="level1"><a href="#images">Images</a></li>
+<li class="level1"><a href="#commands-not-yet-tested">Commands not yet tested</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
@@ -48,8 +50,19 @@
<p><b>Note: </b>The code above doesn't compile</p>
</div>
<hr />
+<h2 id="images">Images</h2>
+<p>An image without any text:</p>
+<p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p><p>An image with just an alternative text:</p>
+<p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="Image alt" /></p><p>An image with alternative text and 1-atom caption:</p>
+<p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="Image alt" /></p><p class="figCaption">Image caption</p>
+<p>An image with alternative text and 2-atom caption:</p>
+<p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="Image alt" /></p><p class="figCaption">Image caption without bold text</p>
+<p>A bordered image:</p>
+<div class="border"><p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p></div><p>A bordered image with a caption:</p>
+<div class="border"><p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p></div><p class="figCaption">Screenshot of the System Tray Icon</p>
+<h2 id="commands-not-yet-tested">Commands not yet tested</h2>
<div class="admonition warning">
-<p><b>Warning: </b>The following commands have yet to be tested: footnote link 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 skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</p>
+<p><b>Warning: </b>The following commands have yet to be tested: footnote link sincelist header index topicref // or just don’t care, remove it inlineimage printline printto printuntil // what’s the difference between printto and printuntil??? quotefile quotefromfile skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</p>
</div>
</div>
<!-- @@@qdoctests-qdocfileoutput-exhaustive.html -->
diff --git a/tests/auto/qdoc/generatedoutput/expected_output/tocbreadcrumbs/qdoctests-qdocfileoutput-exhaustive.html b/tests/auto/qdoc/generatedoutput/expected_output/tocbreadcrumbs/qdoctests-qdocfileoutput-exhaustive.html
index d2b50cf95..d41bd2423 100644
--- a/tests/auto/qdoc/generatedoutput/expected_output/tocbreadcrumbs/qdoctests-qdocfileoutput-exhaustive.html
+++ b/tests/auto/qdoc/generatedoutput/expected_output/tocbreadcrumbs/qdoctests-qdocfileoutput-exhaustive.html
@@ -24,6 +24,8 @@
<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>
+<li class="level1"><a href="#images">Images</a></li>
+<li class="level1"><a href="#commands-not-yet-tested">Commands not yet tested</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
@@ -57,8 +59,19 @@
<p><b>Note: </b>The code above doesn't compile</p>
</div>
<hr />
+<h2 id="images">Images</h2>
+<p>An image without any text:</p>
+<p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p><p>An image with just an alternative text:</p>
+<p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="Image alt" /></p><p>An image with alternative text and 1-atom caption:</p>
+<p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="Image alt" /></p><p class="figCaption">Image caption</p>
+<p>An image with alternative text and 2-atom caption:</p>
+<p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="Image alt" /></p><p class="figCaption">Image caption without bold text</p>
+<p>A bordered image:</p>
+<div class="border"><p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p></div><p>A bordered image with a caption:</p>
+<div class="border"><p class="centerAlign"><img src="images/leonardo-da-vinci.png" alt="" /></p></div><p class="figCaption">Screenshot of the System Tray Icon</p>
+<h2 id="commands-not-yet-tested">Commands not yet tested</h2>
<div class="admonition warning">
-<p><b>Warning: </b>The following commands have yet to be tested: footnote link 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 skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</p>
+<p><b>Warning: </b>The following commands have yet to be tested: footnote link sincelist header index topicref // or just don’t care, remove it inlineimage printline printto printuntil // what’s the difference between printto and printuntil??? quotefile quotefromfile skipline skipto skipuntil span snippet codeline overload sub sup tableofcontents tt uicontrol endmapref endomit underline unicode</p>
</div>
</div>
<!-- @@@qdoctests-qdocfileoutput-exhaustive.html -->
diff --git a/tests/auto/qdoc/generatedoutput/testdata/configs/config.qdocconf b/tests/auto/qdoc/generatedoutput/testdata/configs/config.qdocconf
index 70129901c..4fbd70861 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/configs/config.qdocconf
+++ b/tests/auto/qdoc/generatedoutput/testdata/configs/config.qdocconf
@@ -12,3 +12,8 @@ warninglimit.enabled = true
# don't write host system-specific paths to index files
locationinfo = false
+
+# Macro from qtbase/doc/global/macros.qdocconf
+# The file cannot be included directly, because it requires many
+# variables to be set, like QT_VER
+macro.borderedimage = "\\div {class=\"border\"} \\image \1\n\\enddiv"
diff --git a/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc b/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
index f3289f4ee..37dfdda5e 100644
--- a/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
+++ b/tests/auto/qdoc/generatedoutput/testdata/outputfromqdocfiles/qdoctests-outputfromqdocfiles.qdoc
@@ -149,6 +149,42 @@
\hr
+ \section1 Images
+
+ An image without any text:
+
+ \image leonardo-da-vinci.png
+
+ An image with just an alternative text:
+
+ \image leonardo-da-vinci.png Image alt
+
+ An image with alternative text and 1-atom caption:
+
+ \image leonardo-da-vinci.png Image alt
+ \caption Image caption
+
+ An image with alternative text and 2-atom caption:
+
+ \image leonardo-da-vinci.png Image alt
+ \caption Image caption without bold text
+
+ A bordered image:
+
+ \borderedimage leonardo-da-vinci.png
+
+ //! A bordered image with alternative text:
+ //!
+ //! \borderedimage leonardo-da-vinci.png Screenshot of the Drill Down Example
+ //! It looks like this macro is not written to handle alternative text (no \2)
+
+ A bordered image with a caption:
+
+ \borderedimage leonardo-da-vinci.png
+ \caption Screenshot of the System Tray Icon
+
+ \section1 Commands not yet tested
+
\warning The following commands have yet to be tested:
footnote
link
@@ -157,7 +193,6 @@
header
index
topicref // or just don’t care, remove it
- image
inlineimage
printline
printto