summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJames Godfrey-Kittle <jamesgk@google.com>2015-12-11 12:13:45 -0800
committerJames Godfrey-Kittle <jamesgk@google.com>2015-12-11 12:15:30 -0800
commit2b60cf910ae45ddc036d3e0ea5e2621b5f88f6e4 (patch)
tree4f49c74d2a3c8fc5d378b26ec9010a9764b54e7b /scripts
parentf9116ecf24f80e3c9161cd5189e8e9a90c03e908 (diff)
Add name, metadata tests for general and android
There's no reason not to have these, and they're quite helpful for catching little issues.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/run_android_tests.py20
-rwxr-xr-xscripts/run_general_tests.py14
2 files changed, 34 insertions, 0 deletions
diff --git a/scripts/run_android_tests.py b/scripts/run_android_tests.py
index 3751670..f6a1f46 100755
--- a/scripts/run_android_tests.py
+++ b/scripts/run_android_tests.py
@@ -19,12 +19,32 @@
import unittest
from nototools.unittests import font_tests
+import run_general_tests
+
FONTS = font_tests.load_fonts(
['out/android/*.ttf'],
expected_count=18)
+class TestMetaInfo(run_general_tests.TestMetaInfo):
+ """Bugs:
+ https://github.com/google/roboto/issues/142
+ """
+
+ loaded_fonts = FONTS
+ mark_heavier_as_bold = True
+
+
+class TestNames(run_general_tests.TestNames):
+ """Bugs:
+ https://github.com/google/roboto/issues/37
+ """
+
+ loaded_fonts = FONTS
+ mark_heavier_as_bold = True
+
+
class TestVerticalMetrics(font_tests.TestVerticalMetrics):
loaded_fonts = FONTS
test_glyphs_ymin_ymax = None
diff --git a/scripts/run_general_tests.py b/scripts/run_general_tests.py
index 3321fa3..78ba44c 100755
--- a/scripts/run_general_tests.py
+++ b/scripts/run_general_tests.py
@@ -61,6 +61,20 @@ class TestMetaInfo(font_tests.TestMetaInfo):
expected_os2_achVendID = 'GOOG'
+class TestNames(font_tests.TestNames):
+ """Bugs:
+ https://github.com/google/roboto/issues/37
+ """
+
+ loaded_fonts = FONTS
+ family_name = 'Roboto'
+ mark_heavier_as_bold = False
+ expected_copyright = 'Font data copyright Google 2015'
+
+ def expected_unique_id(self, family, style):
+ return 'Google:%s:2015' % family
+
+
class TestDigitWidths(font_tests.TestDigitWidths):
loaded_fonts = FONTS