chiark / gitweb /
doxygen: verify that latex blow up is handled properly.
authorVladimír Vondruš <mosra@centrum.cz>
Tue, 15 May 2018 16:53:43 +0000 (18:53 +0200)
committerVladimír Vondruš <mosra@centrum.cz>
Tue, 15 May 2018 16:53:43 +0000 (18:53 +0200)
doxygen/test/contents_math/input.dox
doxygen/test/test_contents.py

index b335ca6d47468618ee4db3f87def65ba9fa5bfb1..6f41d3d36f7cd8988289f75afe4a2278b169ab1c 100644 (file)
@@ -21,3 +21,13 @@ formula has a custom environment:
 \f}
 
 */
+
+/** @page error Error
+
+This will blow up when rendered and should print a warning to output:
+
+@f[
+    \hat{
+@f]
+
+*/
index d6d578b1748d2ff46e84b0144beff1939865f66e..3e17938e87f4301f74de4c3678640b5ab93e3d25 100644 (file)
@@ -24,6 +24,7 @@
 
 import os
 import shutil
+import subprocess
 import unittest
 
 from distutils.version import LooseVersion
@@ -111,6 +112,12 @@ class Math(IntegrationTestCase):
         self.run_dox2html5(wildcard='indexpage.xml')
         self.assertEqual(*self.actual_expected_contents('index.html'))
 
+    @unittest.skipUnless(shutil.which('latex'),
+                         "Math rendering requires LaTeX installed")
+    def test_latex_error(self):
+        with self.assertRaises(subprocess.CalledProcessError) as context:
+            self.run_dox2html5(wildcard='error.xml')
+
 class Tagfile(IntegrationTestCase):
     def __init__(self, *args, **kwargs):
         super().__init__(__file__, 'tagfile', *args, **kwargs)