[tests/shaping] Allow comments in test files
Line should start with "# ".
This commit is contained in:
parent
ed900ee9af
commit
ee3a3e10d4
|
@ -47,6 +47,20 @@ for filename in args:
|
|||
f = open (filename)
|
||||
|
||||
for line in f:
|
||||
comment = False
|
||||
if line.startswith ("#"):
|
||||
comment = True
|
||||
line = line[1:]
|
||||
|
||||
if line.startswith (' '):
|
||||
if not reference:
|
||||
print ("#%s" % line)
|
||||
continue
|
||||
|
||||
line = line.strip ()
|
||||
if not line:
|
||||
continue
|
||||
|
||||
fontfile, options, unicodes, glyphs_expected = line.split (":")
|
||||
if fontfile.startswith ('/') or fontfile.startswith ('"/'):
|
||||
fontfile, expected_hash = fontfile.split('@')
|
||||
|
@ -68,11 +82,10 @@ for filename in args:
|
|||
fontfile = os.path.normpath (os.path.join (cwd, fontfile))
|
||||
|
||||
extra_options = ["--shaper=ot"]
|
||||
glyphs_expected = glyphs_expected.strip()
|
||||
if glyphs_expected != '*':
|
||||
extra_options.append("--verify")
|
||||
|
||||
if line.startswith ("#"):
|
||||
if comment:
|
||||
if not reference:
|
||||
print ("# %s %s --unicodes %s" % (hb_shape, fontfile, unicodes))
|
||||
continue
|
||||
|
|
Loading…
Reference in New Issue