From: Vladimír Vondruš Date: Tue, 15 May 2018 16:53:43 +0000 (+0200) Subject: doxygen: verify that latex blow up is handled properly. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=6730b2613d197aa82eb8e5193bbed788d654a329;p=blog.git doxygen: verify that latex blow up is handled properly. --- diff --git a/doxygen/test/contents_math/input.dox b/doxygen/test/contents_math/input.dox index b335ca6d..6f41d3d3 100644 --- a/doxygen/test/contents_math/input.dox +++ b/doxygen/test/contents_math/input.dox @@ -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] + +*/ diff --git a/doxygen/test/test_contents.py b/doxygen/test/test_contents.py index d6d578b1..3e17938e 100644 --- a/doxygen/test/test_contents.py +++ b/doxygen/test/test_contents.py @@ -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)