chiark / gitweb /
documentation/doxygen: test that direct HTML embedding works.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 4 Jan 2022 20:17:22 +0000 (21:17 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 4 Jan 2022 20:23:38 +0000 (21:23 +0100)
It should since 1.8.18.

documentation/test_doxygen/contents_htmlinclude/input.dox [deleted file]
documentation/test_doxygen/contents_htmlonly_htmlinclude/Doxyfile [moved from documentation/test_doxygen/contents_htmlinclude/Doxyfile with 100% similarity]
documentation/test_doxygen/contents_htmlonly_htmlinclude/file.html [moved from documentation/test_doxygen/contents_htmlinclude/file.html with 100% similarity]
documentation/test_doxygen/contents_htmlonly_htmlinclude/html-only.html [new file with mode: 0644]
documentation/test_doxygen/contents_htmlonly_htmlinclude/index.html [moved from documentation/test_doxygen/contents_htmlinclude/index.html with 100% similarity]
documentation/test_doxygen/contents_htmlonly_htmlinclude/input.dox [new file with mode: 0644]
documentation/test_doxygen/contents_htmlonly_htmlinclude/warnings.html [moved from documentation/test_doxygen/contents_htmlinclude/warnings.html with 100% similarity]
documentation/test_doxygen/test_contents.py

diff --git a/documentation/test_doxygen/contents_htmlinclude/input.dox b/documentation/test_doxygen/contents_htmlinclude/input.dox
deleted file mode 100644 (file)
index 6407b05..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-/** @mainpage
-
-@htmlinclude file.html
-*/
-
-/** @page warnings This will produce a warning
-
-@htmlinclude nonexistent.html
-*/
diff --git a/documentation/test_doxygen/contents_htmlonly_htmlinclude/html-only.html b/documentation/test_doxygen/contents_htmlonly_htmlinclude/html-only.html
new file mode 100644 (file)
index 0000000..eda570c
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8" />
+  <title>The htmlonly command | My Project</title>
+  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
+  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
+  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+</head>
+<body>
+<header><nav id="navigation">
+  <div class="m-container">
+    <div class="m-row">
+      <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Project</a>
+    </div>
+  </div>
+</nav></header>
+<main><article>
+  <div class="m-container m-container-inflatable">
+    <div class="m-row">
+      <div class="m-col-l-10 m-push-l-1">
+        <h1>
+          The htmlonly command
+        </h1>
+<p>Works only since Doxygen 1.8.18, before it was not included in the XML output.</p><iframe style="width: 500px; height: 500px;" src="https://mcss.mosra.cz">
+      </div>
+    </div>
+  </div>
+</article></main>
+</body>
+</html>
diff --git a/documentation/test_doxygen/contents_htmlonly_htmlinclude/input.dox b/documentation/test_doxygen/contents_htmlonly_htmlinclude/input.dox
new file mode 100644 (file)
index 0000000..e663697
--- /dev/null
@@ -0,0 +1,18 @@
+/** @mainpage
+
+@htmlinclude file.html
+*/
+
+/** @page html-only The htmlonly command
+
+Works only since Doxygen 1.8.18, before it was not included in the XML output.
+
+@htmlonly
+<iframe style="width: 500px; height: 500px;" src="https://mcss.mosra.cz">
+@endhtmlonly
+*/
+
+/** @page warnings This will produce a warning
+
+@htmlinclude nonexistent.html
+*/
index 06f527c352c53e12d726933f85738d6598c9a60d..0913134ee3b17c59314a7d4dbb25c73a82244753 100644 (file)
@@ -347,11 +347,17 @@ class Dot(IntegrationTestCase):
         self.run_doxygen(wildcard='warnings.xml')
         self.assertEqual(*self.actual_expected_contents('warnings.html'))
 
-class Htmlinclude(IntegrationTestCase):
-    def test(self):
+class HtmlonlyHtmlinclude(IntegrationTestCase):
+    def test_htmlinclude(self):
         self.run_doxygen(wildcard='indexpage.xml')
         self.assertEqual(*self.actual_expected_contents('index.html'))
 
+    @unittest.skipUnless(LooseVersion(doxygen_version()) >= LooseVersion("1.8.18"),
+        "1.8.17 and older doesn't include @htmlonly in XML output")
+    def test_htmlonly(self):
+        self.run_doxygen(wildcard='html-only.xml')
+        self.assertEqual(*self.actual_expected_contents('html-only.html'))
+
     def test_warnings(self):
         self.run_doxygen(wildcard='warnings.xml')
         self.assertEqual(*self.actual_expected_contents('warnings.html'))