diff --git a/Tests/fonts/10x20.pbm b/Tests/fonts/10x20.pbm new file mode 100644 index 000000000..42c38eeb0 Binary files /dev/null and b/Tests/fonts/10x20.pbm differ diff --git a/Tests/fonts/10x20.pil b/Tests/fonts/10x20.pil new file mode 100644 index 000000000..14d6e8be7 Binary files /dev/null and b/Tests/fonts/10x20.pil differ diff --git a/Tests/test_font_pcf.py b/Tests/test_font_pcf.py index 87a3ea067..a19b34d00 100644 --- a/Tests/test_font_pcf.py +++ b/Tests/test_font_pcf.py @@ -26,6 +26,14 @@ class TestFontPcf(PillowTestCase): tempname = self.tempfile("temp.pil") self.addCleanup(self.delete_tempfile, tempname[:-4]+'.pbm') font.save(tempname) + + with Image.open(tempname.replace('.pil', '.pbm')) as loaded: + with Image.open('Tests/fonts/10x20.pbm') as target: + self.assert_image_equal(loaded, target) + + with open(tempname, 'rb') as f_loaded: + with open('Tests/fonts/10x20.pil', 'rb') as f_target: + self.assertEqual(f_loaded.read(), f_target.read()) return tempname def test_sanity(self):