From: Cris Luengo Date: Tue, 7 May 2019 05:13:58 +0000 (-0600) Subject: documentation: test that shows empty page issue. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=af9a7668746af11cd64201e58a3e941d46ae1d29;p=blog.git documentation: test that shows empty page issue. --- diff --git a/documentation/test_doxygen/page_empty_page/Doxyfile b/documentation/test_doxygen/page_empty_page/Doxyfile new file mode 100644 index 00000000..7c1670c1 --- /dev/null +++ b/documentation/test_doxygen/page_empty_page/Doxyfile @@ -0,0 +1,13 @@ +INPUT = input.h input.md +QUIET = YES +GENERATE_HTML = NO +GENERATE_LATEX = NO +GENERATE_XML = YES +XML_PROGRAMLISTING = NO + +##! M_PAGE_FINE_PRINT = +##! M_THEME_COLOR = +##! M_FAVICON = +##! M_LINKS_NAVBAR1 = +##! M_LINKS_NAVBAR2 = +##! M_SEARCH_DISABLED = YES diff --git a/documentation/test_doxygen/page_empty_page/input.h b/documentation/test_doxygen/page_empty_page/input.h new file mode 100644 index 00000000..14461ab2 --- /dev/null +++ b/documentation/test_doxygen/page_empty_page/input.h @@ -0,0 +1,14 @@ +/** @defgroup bla A module +@brief Short module description + +@{ */ + +/** @brief A namespace */ +namespace Foo { + +/** @brief A class */ +class Bar {}; + +} + +/*@}*/ diff --git a/documentation/test_doxygen/page_empty_page/input.md b/documentation/test_doxygen/page_empty_page/input.md new file mode 100644 index 00000000..971a888d --- /dev/null +++ b/documentation/test_doxygen/page_empty_page/input.md @@ -0,0 +1,12 @@ +@ingroup bla + +[comment]: # (The `ingroup` statement above avoids the generation of an empty page for this file.) +[comment]: # (The actual group we add the file to is irrelevant, nothing is actually added.) +[comment]: # (Doxygen will actually create xml/group__bla_md_input.xml, but we want to avoid) +[comment]: # (creating html/group__bla_md_input.html, and listing `input` on the list of pages.) + +@class Foo::Bar + +This is the detailed description for class `Foo::Bar``. +We put it in a separate file to not clutter the header file too much. +Because this is a really loooong description! diff --git a/documentation/test_doxygen/page_empty_page/pages.html b/documentation/test_doxygen/page_empty_page/pages.html new file mode 100644 index 00000000..7943032c --- /dev/null +++ b/documentation/test_doxygen/page_empty_page/pages.html @@ -0,0 +1,46 @@ + + + + + My Project + + + + + +
+
+
+
+
+

Pages

+
    +
+ +
+
+
+
+ + diff --git a/documentation/test_doxygen/test_page.py b/documentation/test_doxygen/test_page.py index 54a2d976..fdee57ea 100644 --- a/documentation/test_doxygen/test_page.py +++ b/documentation/test_doxygen/test_page.py @@ -22,6 +22,7 @@ # DEALINGS IN THE SOFTWARE. # +import os import unittest from distutils.version import LooseVersion @@ -100,3 +101,12 @@ class SubpageOfIndex(IntegrationTestCase): self.run_doxygen(wildcard='*.xml') self.assertEqual(*self.actual_expected_contents('page.html')) self.assertEqual(*self.actual_expected_contents('pages.html')) + +class EmptyPage(IntegrationTestCase): + def __init__(self, *args, **kwargs): + super().__init__(__file__, 'empty_page', *args, **kwargs) + + def test(self): + self.run_doxygen(wildcard='*.xml') + self.assertFalse(os.path.exists(os.path.join(self.path, 'html', 'group__bla_md_input.html'))) + self.assertEqual(*self.actual_expected_contents('pages.html'))