diff --git a/test/shaping/hb-diff b/test/shaping/hb-diff index d6bc2d258..c2ee5300d 100755 --- a/test/shaping/hb-diff +++ b/test/shaping/hb-diff @@ -3,12 +3,12 @@ from hb_test_tools import * import sys, os +colors, sys.argv = Colors.Auto (sys.argv) + if len (sys.argv) != 3: print "usage: %s [--color] file1 file2" % sys.argv[0] sys.exit (1) -colors = Colors.Auto (sys.argv) +files = (FileHelpers.open_file_or_stdin (f) for f in sys.argv[1:3]) -f1, f2 = (open_file_or_stdin (f) for f in sys.argv[1:3]) - -FancyDiffer.diff_files (f1, f2, colors=colors) +FancyDiffer.diff_files (*files, colors=colors) diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py index 471502f25..f303256fd 100644 --- a/test/shaping/hb_test_tools.py +++ b/test/shaping/hb_test_tools.py @@ -21,9 +21,9 @@ class Colors: if "--color" in argv or os.isatty (out.fileno ()): if "--color" in sys.argv[1:]: argv.remove ("--color") - return Colors.ANSI + return Colors.ANSI, argv else: - return Colors.Null + return Colors.Null, argv @staticmethod def Default (argv = []):