# paperdoorknob: Print glowfic # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, version 3. import unittest from texfilter import ApplyTexFilters class TestTexFilters(unittest.TestCase): def testStripNBSP(self) -> None: self.assertEqual( ApplyTexFilters("FixBareNesting", b'\\emph{Yes?}'), b'\\hspace{0pt}\\emph{Yes?}') self.assertEqual( ApplyTexFilters("FixBareNesting", b'Reassuring.\n\n\\emph{Yes?}'), b'Reassuring.\n\n\\hspace{0pt}\\emph{Yes?}') self.assertEqual( ApplyTexFilters("FixBareNesting", b'\\st{Nope}'), b'\\hspace{0pt}\\st{Nope}') if __name__ == '__main__': unittest.main()