X-Git-Url: http://git.scottworley.com/paperdoorknob/blobdiff_plain/681c2bd06893c728febe8e2a8f61f204a6b23deb..4aa870922e636a50ec829471e0de5ca6a6103974:/paperdoorknob_test.py diff --git a/paperdoorknob_test.py b/paperdoorknob_test.py index 2787287..a608f8b 100644 --- a/paperdoorknob_test.py +++ b/paperdoorknob_test.py @@ -8,6 +8,7 @@ from abc import ABC, abstractmethod import unittest import io +import re import subprocess import paperdoorknob @@ -45,20 +46,17 @@ class BaseTestProcess(ABC): 'margin=20mm', buf) paperdoorknob.process(spec) - assert buf.getvalue() == b'''\\documentclass{article} -\\usepackage{graphicx} -\\usepackage{varwidth} -\\usepackage{wrapstuff} -\\usepackage[margin=20mm]{geometry} + assert re.match(br'''\\documentclass{article} +(\\usepackage{[a-z]+}\n)+\\usepackage\[margin=20mm\]{geometry} \\begin{document} This is glowfic -You \\emph{sure}? +You \\emph{sure}\? Pretty sure. \\end{document} -''' +''', buf.getvalue()) def testDirectTexifier(self) -> None: texifier = VerifyingTexifier(