From 6730b2613d197aa82eb8e5193bbed788d654a329 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 15 May 2018 18:53:43 +0200 Subject: [PATCH] doxygen: verify that latex blow up is handled properly. --- doxygen/test/contents_math/input.dox | 10 ++++++++++ doxygen/test/test_contents.py | 7 +++++++ 2 files changed, 17 insertions(+) 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) -- 2.30.2