[gtk-doc] scan: add a test for title extraction



commit cc7bb6a58c906ef1c33576314407135c31419a15
Author: Stefan Sauer <ensonic users sf net>
Date:   Sat Feb 2 21:32:10 2019 +0100

    scan: add a test for title extraction

 tests/scan.py | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/tests/scan.py b/tests/scan.py
index f1468fa..fd293dc 100755
--- a/tests/scan.py
+++ b/tests/scan.py
@@ -461,6 +461,15 @@ class ScanHeaderContentStructs(ScanHeaderContentTestCase):
         slist, doc_comments = self.scanHeaderContent([header])
         self.assertDecl('data', header, slist)
 
+    def test_GetTitleFromGObjectClassStruct(self):
+        header = textwrap.dedent("""\
+            struct _GtkdocObjectClass {
+              GObjectClass parent;
+            };""")
+        slist, doc_comments = self.scanHeaderContent(
+            header.splitlines(keepends=True))
+        self.assertIn('<TITLE>GtkdocObject</TITLE>', slist)
+
 
 class ScanHeaderContentUnions(ScanHeaderContentTestCase):
     """Test parsing of union declarations."""


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]