Imported Upstream version 0.9.12
[platform/upstream/harfbuzz.git] / test / shaping / hb_test_tools.py
index ce46588..ccb0e1c 100644 (file)
@@ -295,9 +295,12 @@ class DiffHelpers:
        def test_passed (lines):
                lines = list (lines)
                # XXX This is a hack, but does the job for now.
-               if any (l.find("space|space") >= 0 for l in lines): return True
-               if any (l.find("uni25CC") >= 0 for l in lines): return True
-               if any (l.find("dottedcircle") >= 0 for l in lines): return True
+               if any (l.find("space+0|space+0") >= 0 for l in lines if l[0] == '+'): return True
+               if any (l.find("uni25CC") >= 0 for l in lines if l[0] == '+'): return True
+               if any (l.find("dottedcircle") >= 0 for l in lines if l[0] == '+'): return True
+               if any (l.find("glyph0") >= 0 for l in lines if l[0] == '+'): return True
+               if any (l.find("gid0") >= 0 for l in lines if l[0] == '+'): return True
+               if any (l.find("notdef") >= 0 for l in lines if l[0] == '+'): return True
                return all (l[0] == ' ' for l in lines)
 
 
@@ -406,8 +409,8 @@ class Unicode:
 
        @staticmethod
        def parse (s):
-               s = re.sub (r"[<+>,\\uU\n       ]", " ", s)
                s = re.sub (r"0[xX]", " ", s)
+               s = re.sub (r"[<+>,;&#\\xXuU\n  ]", " ", s)
                return [int (x, 16) for x in s.split (' ') if len (x)]
 
        @staticmethod