From f1226988104281b576878cd8c306d03cc91aa111 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Thu, 12 Aug 2021 01:47:35 +0200 Subject: [PATCH] [test] Improve generate-expected-outputs.py diff output --- test/subset/generate-expected-outputs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/subset/generate-expected-outputs.py b/test/subset/generate-expected-outputs.py index fabdfef4b..2182643ab 100755 --- a/test/subset/generate-expected-outputs.py +++ b/test/subset/generate-expected-outputs.py @@ -28,7 +28,7 @@ def strip_check_sum (ttx_string): def generate_expected_output(input_file, unicodes, profile_flags, output_directory, font_name): - fonttools_path = os.path.join(output_directory, font_name) + fonttools_path = os.path.join(tempfile.mkdtemp (), font_name) args = ["fonttools", "subset", input_file] args.extend(["--drop-tables+=DSIG", "--drop-tables-=sbix", @@ -57,7 +57,7 @@ def generate_expected_output(input_file, unicodes, profile_flags, output_directo harfbuzz_ttx = strip_check_sum (fp.getvalue ()) if harfbuzz_ttx != fonttools_ttx: - for line in unified_diff (fonttools_ttx.splitlines (1), harfbuzz_ttx.splitlines (1)): + for line in unified_diff (fonttools_ttx.splitlines (1), harfbuzz_ttx.splitlines (1), fonttools_path, harfbuzz_path): sys.stdout.write (line) sys.stdout.flush () raise Exception ('ttx for fonttools and harfbuzz does not match.')