Skip to content

Commit

Permalink
Add regression tests for null PDF strings
Browse files Browse the repository at this point in the history
  • Loading branch information
pmaupin committed Apr 13, 2017
1 parent 6753976 commit f948261
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_pdfstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ def test_BOM_variants(self):
def test_byte_encode(self):
self.assertEqual(self.encode(b'ABC'), '(ABC)')

def test_nullstring(self):
self.assertEqual(PdfString('<>').to_bytes(), b'')
self.assertEqual(PdfString('()').to_bytes(), b'')

def main():
unittest.main()

Expand Down

0 comments on commit f948261

Please sign in to comment.