Skip to content

Commit

Permalink
documentation/doxygen: test that direct HTML embedding works.
Browse files Browse the repository at this point in the history
It should since 1.8.18.
  • Loading branch information
mosra committed Jan 4, 2022
1 parent 7b1dae8 commit fb5fd85
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 11 deletions.
9 changes: 0 additions & 9 deletions documentation/test_doxygen/contents_htmlinclude/input.dox

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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>
18 changes: 18 additions & 0 deletions documentation/test_doxygen/contents_htmlonly_htmlinclude/input.dox
Original file line number Diff line number Diff line change
@@ -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
*/
10 changes: 8 additions & 2 deletions documentation/test_doxygen/test_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,17 @@ def test_warnings(self):
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'))
Expand Down

0 comments on commit fb5fd85

Please sign in to comment.