test/shaping/hb-diff | 2 +- test/shaping/hb_test_tools.py | 26 ++++++++++++++++++++------ 2 files changed, 21 insertions(+), 7 deletions(-)
New commits: commit 71be4ca3dd5eaaca31957e34fef11f6aeb4aebdf Author: Behdad Esfahbod <[email protected]> Date: Sun Jan 22 16:26:49 2012 -0500 Also ignore "ChangeLog" in manifests diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py index b564c24..aeecb45 100644 --- a/test/shaping/hb_test_tools.py +++ b/test/shaping/hb_test_tools.py @@ -295,7 +295,7 @@ class Manifest: for dirpath, dirnames, filenames in os.walk (s, followlinks=True): - for f in ["MANIFEST", "README", "LICENSE", "COPYING", "AUTHORS", "SOURCES"]: + for f in ["MANIFEST", "README", "LICENSE", "COPYING", "AUTHORS", "SOURCES", "ChangeLog"]: if f in dirnames: dirnames.remove (f) if f in filenames: commit 3c9a39ecd65990f2c7b29bb741c6a538fa425531 Author: Behdad Esfahbod <[email protected]> Date: Sun Jan 22 16:21:19 2012 -0500 Remove newline diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py index 4b261c1..b564c24 100644 --- a/test/shaping/hb_test_tools.py +++ b/test/shaping/hb_test_tools.py @@ -188,6 +188,8 @@ class UtilMains: line = sys.stdin.readline () if not len (line): break + if line[-1] == '\n': + line = line[:-1] print callback (line) else: args = sys.argv[1:] commit e4ccbfe276db5ed098ddcf78a7bb8f2da4263128 Author: Behdad Esfahbod <[email protected]> Date: Sun Jan 22 16:07:32 2012 -0500 Allow --color=html in hb-diff Not that useful right now as we don't escape < and >. Perhaps another tool can be added to convert the ANSI output to HTML. diff --git a/test/shaping/hb-diff b/test/shaping/hb-diff index c2ee530..29fd119 100755 --- a/test/shaping/hb-diff +++ b/test/shaping/hb-diff @@ -3,7 +3,7 @@ from hb_test_tools import * import sys, os -colors, sys.argv = Colors.Auto (sys.argv) +colors = Colors.Auto (sys.argv) if len (sys.argv) != 3: print "usage: %s [--color] file1 file2" % sys.argv[0] diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py index b78cdca..4b261c1 100644 --- a/test/shaping/hb_test_tools.py +++ b/test/shaping/hb_test_tools.py @@ -18,12 +18,24 @@ class Colors: @staticmethod def Auto (argv = [], out = sys.stdout): - if "--color" in argv or os.isatty (out.fileno ()): - if "--color" in sys.argv[1:]: - argv.remove ("--color") - return Colors.ANSI, argv + if os.isatty (out.fileno ()): + color = Colors.ANSI else: - return Colors.Null, argv + color = Colors.Null + if "--color" in argv: + argv.remove ("--color") + color = Colors.ANSI + if "--color=ansi" in argv: + argv.remove ("--color=ansi") + color = Colors.ANSI + if "--color=html" in argv: + argv.remove ("--color=html") + color = Colors.HTML + if "--no-color" in argv: + argv.remove ("--no-color") + color = Colors.Null + return color + @staticmethod def Default (argv = []): _______________________________________________ HarfBuzz mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/harfbuzz
