]> git.scottworley.com Git - paperdoorknob/blobdiff - paperdoorknob_test.py
Handle Unicode characters ≈ and ◁
[paperdoorknob] / paperdoorknob_test.py
index 28408d6138003d0ce616bc0e034cb9f9d52a250f..571dda6847abb40b59855b9c90d81d28ce12f95a 100644 (file)
@@ -45,7 +45,7 @@ class BaseTestProcess(ABC):
             texifier,
             lambda x: x,
             20,
-            ContentOnlyLayout(texifier),
+            ContentOnlyLayout,
             'margin=20mm',
             buf,
             lambda _: None)
@@ -54,12 +54,9 @@ class BaseTestProcess(ABC):
 (\\usepackage{[a-z]+}\n)+\\usepackage\[margin=20mm\]{geometry}
 \\begin{document}
 (.|\n)*
-This is \\href{https://glowfic.com}{glowfic}
-
-You \\emph{sure}\?
-
-Pretty sure.
-
+\\glowhead{}{}{}{}This is \\href{https://glowfic.com}{glowfic}
+\\glowhead{}{}{}{}You \\emph{sure}\?
+\\glowhead{}{}{}{}Pretty sure.
 \\end{document}
 ''', buf.getvalue())
 
@@ -76,7 +73,7 @@ Pretty sure.
             texifier,
             lambda x: x,
             20,
-            ContentOnlyLayout(texifier),
+            ContentOnlyLayout,
             None,
             buf,
             lambda _: None)
@@ -94,7 +91,7 @@ Pretty sure.
                 texifier,
                 lambda x: x,
                 20,
-                BesideIconLayout(texifier),
+                BesideIconLayout,
                 None,
                 out,
                 lambda _: None)
@@ -124,7 +121,8 @@ class TestProcessFromFakeFetcher(BaseTestProcess, unittest.TestCase):
 
     def fetcher(self) -> Fetcher:
         with open('testdata/this-is-glowfic.html', 'rb') as f:
-            return FakeFetcher({'fic?view=flat': f.read(9999)})
+            html = f.read(9999)
+            return FakeFetcher({'fic': html, 'fic?view=flat': html})
 
 
 if __name__ == '__main__':