chiark / gitweb /
documentation/doxygen: adapt test output for silly 1.8.18 differences.
authorVladimír Vondruš <mosra@centrum.cz>
Sun, 9 Jan 2022 21:43:13 +0000 (22:43 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Sun, 9 Jan 2022 21:50:15 +0000 (22:50 +0100)
Is this a random order? FFS.

documentation/test_doxygen/contents_blocks/old.html
documentation/test_doxygen/contents_blocks/old_1817.html [new file with mode: 0644]
documentation/test_doxygen/test_contents.py

index 13f01f802a66983546d5cbdd1592d46b3c07385f..acb3c1c03023e4207a8ffc4e514acc39028b1d37 100644 (file)
@@ -22,7 +22,7 @@
         <h1>
           Just old
         </h1>
-<dl class="m-doc"><dt>Member <a href="File_8h.html#a14bcd2d544b22300bba3863251393e0f" class="m-doc">foo</a>  ()</dt><dd><p><a name="_old000004"></a> Xrefitem, gets merged</p><p>with this one by Doxygen itself.</p></dd><dt>page <a href="index.html" class="m-doc">Main Page</a></dt><dd><p><a name="_old000001"></a> This is old.</p><p><a name="_old000002"></a> This is not merged.</p><p><a name="_old000003"></a> With this. Only on the listing page.</p></dd></dl>
+<dl class="m-doc"><dt>page <a href="index.html" class="m-doc">Main Page</a></dt><dd><p><a name="_old000001"></a> This is old.</p><p><a name="_old000002"></a> This is not merged.</p><p><a name="_old000003"></a> With this. Only on the listing page.</p></dd><dt>Member <a href="File_8h.html#a14bcd2d544b22300bba3863251393e0f" class="m-doc">foo</a>  ()</dt><dd><p><a name="_old000004"></a> Xrefitem, gets merged</p><p>with this one by Doxygen itself.</p></dd></dl>
       </div>
     </div>
   </div>
diff --git a/documentation/test_doxygen/contents_blocks/old_1817.html b/documentation/test_doxygen/contents_blocks/old_1817.html
new file mode 100644 (file)
index 0000000..13f01f8
--- /dev/null
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+  <meta charset="UTF-8" />
+  <title>Just old | 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>
+          Just old
+        </h1>
+<dl class="m-doc"><dt>Member <a href="File_8h.html#a14bcd2d544b22300bba3863251393e0f" class="m-doc">foo</a>  ()</dt><dd><p><a name="_old000004"></a> Xrefitem, gets merged</p><p>with this one by Doxygen itself.</p></dd><dt>page <a href="index.html" class="m-doc">Main Page</a></dt><dd><p><a name="_old000001"></a> This is old.</p><p><a name="_old000002"></a> This is not merged.</p><p><a name="_old000003"></a> With this. Only on the listing page.</p></dd></dl>
+      </div>
+    </div>
+  </div>
+</article></main>
+</body>
+</html>
index b32a65c629541591daa4aae16f6ae4299fd3a37c..cb5e31e77776c013dbb8b9c651495af8554804bc 100644 (file)
@@ -61,19 +61,22 @@ class Blocks(IntegrationTestCase):
         self.run_doxygen(wildcard='*.xml')
         self.assertEqual(*self.actual_expected_contents('doxygen1818.html'))
 
-    @unittest.skipUnless(LooseVersion(doxygen_version()) > LooseVersion("1.8.14"),
-                         "https://github.com/doxygen/doxygen/pull/6587 fucking broke this")
-    def test_xrefitem1814(self):
-        self.run_doxygen(wildcard='*.xml')
-        self.assertEqual(*self.actual_expected_contents('todo.html'))
-        self.assertEqual(*self.actual_expected_contents('old.html'))
-
-    @unittest.skipUnless(LooseVersion(doxygen_version()) <= LooseVersion("1.8.14"),
-                         "https://github.com/doxygen/doxygen/pull/6587 fucking broke this")
     def test_xrefitem(self):
         self.run_doxygen(wildcard='*.xml')
-        self.assertEqual(*self.actual_expected_contents('todo.html', 'todo_1814.html'))
-        self.assertEqual(*self.actual_expected_contents('old.html', 'old_1814.html'))
+
+        if LooseVersion(doxygen_version()) > LooseVersion("1.8.14"):
+            self.assertEqual(*self.actual_expected_contents('todo.html'))
+        # https://github.com/doxygen/doxygen/pull/6587 fucking broke this
+        else:
+            self.assertEqual(*self.actual_expected_contents('todo.html', 'todo_1814.html'))
+
+        # 1.8.18 has a different order, not sure why
+        if LooseVersion(doxygen_version()) >= LooseVersion("1.8.18"):
+            self.assertEqual(*self.actual_expected_contents('old.html'))
+        elif LooseVersion(doxygen_version()) > LooseVersion("1.8.14"):
+            self.assertEqual(*self.actual_expected_contents('old.html', 'old_1817.html'))
+        else:
+            self.assertEqual(*self.actual_expected_contents('old.html', 'old_1814.html'))
 
 class Internal(IntegrationTestCase):
     def test(self):