diff options
Diffstat (limited to 'scripts/common_tests.py')
-rw-r--r-- | scripts/common_tests.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/common_tests.py b/scripts/common_tests.py index 952e794..f30afa0 100644 --- a/scripts/common_tests.py +++ b/scripts/common_tests.py @@ -238,6 +238,24 @@ class TestNames(FontTest): self.assertIn(17, records) self.assertEqual(records[17], self.build_style(weight, slope)) + def test_unique_identifier_and_full_name(self): + """Tests the unique identifier and full name.""" + for font_file, records in zip(self.font_files, self.names): + family, weight, slope = self.parse_filename(font_file) + style = self.build_style(weight, slope) + expected_name = family + ' ' + style + self.assertEqual(records[3], expected_name) + self.assertEqual(records[4], expected_name) + self.assertFalse(records.has_key(18)) + + def test_postscript_name(self): + """Tests the postscript name.""" + for font_file, records in zip(self.font_files, self.names): + family, weight, slope = self.parse_filename(font_file) + style = self.build_style(weight, slope) + expected_name = (family + '-' + style).replace(' ', '') + self.assertEqual(records[6], expected_name) + def test_postscript_name_for_spaces(self): """Tests that there are no spaces in PostScript names.""" for records in self.names: |