diff options
author | Stefan Sauer <ensonic@users.sf.net> | 2019-03-08 08:13:13 +0100 |
---|---|---|
committer | Stefan Sauer <ensonic@users.sf.net> | 2019-03-09 17:37:55 +0100 |
commit | 04d3394d18598a7f6711e9ba53d151ea5b07392b (patch) | |
tree | 602a0583f6ca0d2f6f32e5d6bc1fa1359983b50e /tests | |
parent | 323d8df17d855016af34cad36615e316a6fd64b7 (diff) | |
download | gtk-doc-04d3394d18598a7f6711e9ba53d151ea5b07392b.tar.gz |
mhhtml2: add coverage for constants in devhelp generation
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/mkhtml2.py | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/mkhtml2.py b/tests/mkhtml2.py index 00d3fd5..c61ee27 100755 --- a/tests/mkhtml2.py +++ b/tests/mkhtml2.py @@ -126,6 +126,7 @@ class TestDevhelp(unittest.TestCase): <chapter id="chap1"><title>Intro</title></chapter> </book>""") + # TODO: need one with multiple conditions xml_full = textwrap.dedent("""\ <book> <bookinfo> @@ -175,6 +176,47 @@ class TestDevhelp(unittest.TestCase): </refsect3> </refsect2> </refsect1> + <refsect1 id="tester-GtkdocTypes.other_details" role="details"> + <title role="details.title">Types and Values</title> + <refsect2 id="GtkdocEnum" role="enum"> + <title>enum GtkdocEnum</title> + <indexterm zone="GtkdocEnum"> + <primary>GtkdocEnum</primary> + </indexterm> + <para>Enum values for the <link linkend="GtkdocEnum"><type>GtkdocEnum</type> + </link> type.</para> + <refsect3 id="GtkdocEnum.members" role="enum_members"> + <title>Members</title> + <informaltable role="enum_members_table" pgwide="1" frame="none"> + <tgroup cols="3"> + <colspec colname="enum_members_name" colwidth="300px"/> + <colspec colname="enum_members_description"/> + <colspec colname="enum_members_annotations" colwidth="200px"/> + <tbody> + <row role="constant"> + <entry role="enum_member_name"> + <para id="GTKDOC-ENUM-V1:CAPS">GTKDOC_ENUM_V1</para> + </entry> + <entry role="enum_member_description"> + <para>first</para> + </entry> + <entry role="enum_member_annotations"></entry> + </row> + <row role="constant"> + <entry role="enum_member_name"> + <para id="GTKDOC-ENUM-V2:CAPS">GTKDOC_ENUM_V2</para> + </entry> + <entry role="enum_member_description"> + <para>second Since: 0.5</para> + </entry> + <entry role="enum_member_annotations"></entry> + </row> + </tbody> + </tgroup> + </informaltable> + </refsect3> + </refsect2> + </refsect1> </refentry> </chapter> </book>""") @@ -225,6 +267,13 @@ class TestDevhelp(unittest.TestCase): 'link="GtkdocObject.html#GtkdocObjectClass.parent"/>', devhelp) + def test_create_devhelp_with_refesect3_has_constant_keywords(self): + devhelp = self.convert(self.xml_full) + self.assertIn( + '<keyword type="constant" name="GTKDOC_ENUM_V1" ' + 'link="GtkdocObject.html#GTKDOC-ENUM-V1:CAPS"/>', + devhelp) + class TestNavNodes(unittest.TestCase): |