mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-04 21:15:06 +00:00
[test/shape] Improve run-tests output on failure
This commit is contained in:
parent
18ced8dbb1
commit
c260550ae5
1 changed files with 19 additions and 4 deletions
|
@ -288,15 +288,30 @@ for filename in args:
|
||||||
cmd2 = [fontfile] + ["--glyphs", "--no-glyph-names", glyphs]
|
cmd2 = [fontfile] + ["--glyphs", "--no-glyph-names", glyphs]
|
||||||
final_glyphs = shape_cmd(cmd2, no_glyph_names_process).strip()
|
final_glyphs = shape_cmd(cmd2, no_glyph_names_process).strip()
|
||||||
|
|
||||||
cmd2 = [fontfile] + ["--glyphs", "--no-glyph-names", glyphs_expected]
|
cmd2 = [fontfile] + [
|
||||||
final_glyphs_expected = shape_cmd(cmd2, no_glyph_names_process).strip()
|
"--glyphs",
|
||||||
|
"--no-glyph-names",
|
||||||
|
glyphs_expected,
|
||||||
|
]
|
||||||
|
final_glyphs_expected = shape_cmd(
|
||||||
|
cmd2, no_glyph_names_process
|
||||||
|
).strip()
|
||||||
|
|
||||||
# If the removal of glyph_ids failed, fail the test.
|
# If the removal of glyph_ids failed, fail the test.
|
||||||
# https://github.com/harfbuzz/harfbuzz/issues/5169
|
# https://github.com/harfbuzz/harfbuzz/issues/5169
|
||||||
if not final_glyphs_expected or final_glyphs != final_glyphs_expected:
|
if not final_glyphs_expected or final_glyphs != final_glyphs_expected:
|
||||||
print(hb_shape + " " + " ".join(cmd), file=sys.stderr)
|
print(hb_shape + " " + " ".join(cmd), file=sys.stderr)
|
||||||
print("Actual: " + final_glyphs, file=sys.stderr)
|
print("Actual: " + glyphs, file=sys.stderr)
|
||||||
print("Expected: " + final_glyphs_expected, file=sys.stderr)
|
print("Expected: " + glyphs_expected, file=sys.stderr)
|
||||||
|
if final_glyphs != glyphs:
|
||||||
|
print(
|
||||||
|
"Actual (no glyph names): " + final_glyphs,
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
|
print(
|
||||||
|
"Expected (no glyph names): " + final_glyphs_expected,
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
fails += 1
|
fails += 1
|
||||||
else:
|
else:
|
||||||
passes += 1
|
passes += 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue