From f9289319481a1e9762ad366b287e781c44ba9fc6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 31 Oct 2018 18:25:05 -0700 Subject: [PATCH] [test] Minor --- test/shaping/run-tests.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/shaping/run-tests.py b/test/shaping/run-tests.py index 65e0e14..abb25ab 100755 --- a/test/shaping/run-tests.py +++ b/test/shaping/run-tests.py @@ -11,7 +11,13 @@ def cmd(command): return process.stdout.readline().decode ("utf-8").strip () args = sys.argv[1:] -if not args or sys.argv[1].find('hb-shape') == -1 or not os.path.exists (sys.argv[1]): + +reference = False +if len (args) and args[0] == "--reference": + reference = True + args = args[1:] + +if not args or args[0].find('hb-shape') == -1 or not os.path.exists (args[0]): print ("""First argument does not seem to point to usable hb-shape.""") sys.exit (1) hb_shape, args = args[0], args[1:] @@ -23,11 +29,6 @@ process = subprocess.Popen ([hb_shape, '--batch'], fails = 0 -reference = False -if len (args) and args[0] == "--reference": - reference = True - args = args[1:] - if not len (args): args = ['-'] -- 2.7.4