]>
Commit | Line | Data |
---|---|---|
131deef1 SW |
1 | # paperdoorknob: Print glowfic |
2 | # | |
3 | # This program is free software: you can redistribute it and/or modify it | |
4 | # under the terms of the GNU General Public License as published by the | |
5 | # Free Software Foundation, version 3. | |
6 | ||
7 | ||
8 | import unittest | |
9 | from texfilter import ApplyTexFilters | |
10 | ||
11 | ||
12 | class TestTexFilters(unittest.TestCase): | |
13 | ||
14 | def testStripNBSP(self) -> None: | |
15 | self.assertEqual( | |
87fb552d | 16 | ApplyTexFilters("FixBareNesting", b'\\emph{Yes?}'), |
131deef1 SW |
17 | b'\\hspace{0pt}\\emph{Yes?}') |
18 | self.assertEqual( | |
87fb552d | 19 | ApplyTexFilters("FixBareNesting", b'Reassuring.\n\n\\emph{Yes?}'), |
131deef1 | 20 | b'Reassuring.\n\n\\hspace{0pt}\\emph{Yes?}') |
87fb552d SW |
21 | self.assertEqual( |
22 | ApplyTexFilters("FixBareNesting", b'\\st{Nope}'), | |
23 | b'\\hspace{0pt}\\st{Nope}') | |
131deef1 SW |
24 | |
25 | ||
26 | if __name__ == '__main__': | |
27 | unittest.main() |