From 04c1ec2b7396c05f6e8afc9d87679422782aa1e8 Mon Sep 17 00:00:00 2001 From: Garret Rieger Date: Wed, 14 Feb 2018 17:00:18 -0800 Subject: [PATCH] [subset] Don't fail on different checksum adjustment in subsetting tests. --- .../basics/Roboto-Regular.abc.default.62.ttf | Bin 1740 -> 1692 bytes test/subset/run-tests.py | 8 ++++++++ 2 files changed, 8 insertions(+) diff --git a/test/subset/data/expected/basics/Roboto-Regular.abc.default.62.ttf b/test/subset/data/expected/basics/Roboto-Regular.abc.default.62.ttf index 52706dc90320133d24a0a6c3109b9d1ef1bf8ec7..501d1d288c38e4ed350fe0fd177e11e8b6fb224c 100644 GIT binary patch delta 418 zcmXX?JxIeq7=5`UZBkOj9|~57fE@(ENu-0Ipo8uXF4D%NZG^@KTWmz6yL6~@)x}A4 zaBy%DQE(9)oW#*p=ui+rrC48D5AN=JKi|8br}%Nak*G-lfUNCVJ_hj(NG;+id$(dv zpG8jqb%J;;?-#u4SM~xBqx9Sqtg;UcBS54<-6$0I@^_cgBmH6Ct?PJ!t|~El-$LEZ zSx&dAFS71%&bcIvqs10xN1F|=#9FarTgb42>T`*BR^W>2d0LlUC*ig(~RA1|_q92are@}Q6Fu?O5Qea$jMPyC6 i4yPBsx9_qGJNz==f1fWvHt+9ZBOO^ delta 493 zcmX|-%_~Gv7{;Ib>E6jlGo%=4%IuV6A>t3fQWkdRny(vkxtWPUntx!5nk|vl$bwKx z(kv_}D>XYyOKA!`D(b?4+M0FkI;xd=+{fP6)skFIAz zgT5=|7&z&7}vZki`*smz! zcHD}6FFkLu_LV$pQ}Eqr$H+krQwZBmCTp0eu%M4@q*kLA7U)5G;iWrP)|E#TQ#?)% ztyoT6zV>}EWRu6-)pW*l5F;OnxVsj2j}tWxq&~1_8Zz?Un;O!AcJv@|5$Fy21LNm~ zJ?$hXu|mc!x-kb0fovz+0R<=r)&-z zX`;ynjiuxfQ+JRT^)0D7KhT`61?w~BaI-gs|0Nf)Qe=uK-ctF68m;no`sfK=Sbi-g bp&~@9atnRY^P0DJ*z9~+m9~|_gl_!;PVr#o diff --git a/test/subset/run-tests.py b/test/subset/run-tests.py index faf615958..f648627ec 100755 --- a/test/subset/run-tests.py +++ b/test/subset/run-tests.py @@ -7,6 +7,7 @@ from __future__ import print_function import io import os +import re import subprocess import sys import tempfile @@ -57,6 +58,9 @@ def run_test(test): if return_code: return fail_test(test, cli_args, "ttx (actual) returned %d" % (return_code)) + expected_ttx = strip_check_sum (expected_ttx) + actual_ttx = strip_check_sum (expected_ttx) + if not actual_ttx == expected_ttx: return fail_test(test, cli_args, 'ttx for expected and actual does not match.') @@ -68,6 +72,10 @@ def run_ttx(file): file] return cmd(cli_args) +def strip_check_sum (ttx_string): + return re.sub ('checksumAdjustment value=["]0x(\d+)["]', + 'checksumAdjustment value="0x00000000"', + ttx_string, count=1) args = sys.argv[1:] if not args or sys.argv[1].find('hb-subset') == -1 or not os.path.exists (sys.argv[1]):