summaryrefslogtreecommitdiff
path: root/scripts/run_android_tests.py
diff options
context:
space:
mode:
authorRoozbeh Pournader <roozbeh@google.com>2015-01-07 19:00:54 -0800
committerJames Godfrey-Kittle <jamesgk@google.com>2015-04-16 12:16:24 -0700
commita86c86786a6980296408bf22a625747ba9607c7d (patch)
tree7bd53b9ce34510e639561cced8b7e6a47a7a946b /scripts/run_android_tests.py
parent403041dcfae9f364038c3dcc034238d2ea1ddafc (diff)
Add tests for version and revision numbers.
Also add a touchup to fix the revision number.
Diffstat (limited to 'scripts/run_android_tests.py')
-rwxr-xr-xscripts/run_android_tests.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/scripts/run_android_tests.py b/scripts/run_android_tests.py
index bb2bc44..15a4b36 100755
--- a/scripts/run_android_tests.py
+++ b/scripts/run_android_tests.py
@@ -34,6 +34,19 @@ class TestMetaInfo(unittest.TestCase):
font['OS/2'].usWeightClass,
expected_numeric_weight)
+ def test_version_numbers(self):
+ "Tests the two version numbers of the font to be correct."""
+ for font in self.fonts:
+ build_number = roboto_data.get_build_number()
+ expected_version = '2.' + build_number
+ version = font_data.font_version(font)
+ usable_part_of_version = version.split(';')[0]
+ self.assertEqual(usable_part_of_version,
+ 'Version ' + expected_version)
+
+ revision = font_data.printable_font_revision(font, accuracy=5)
+ self.assertEqual(revision, expected_version)
+
class TestVerticalMetrics(unittest.TestCase):
"""Test the vertical metrics of fonts."""