diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py index 3ff75b8e9..47fa6eb9f 100644 --- a/test/shaping/hb_test_tools.py +++ b/test/shaping/hb_test_tools.py @@ -351,7 +351,7 @@ class UtilMains: @staticmethod def process_multiple_args (callback, mnemonic): - if len (sys.argv) == 1: + if len (sys.argv) == 1 or "--help" in sys.argv: print "Usage: %s %s..." % (sys.argv[0], mnemonic) sys.exit (1) @@ -368,14 +368,13 @@ class UtilMains: separator = " ", \ concat_separator = False): - if len (sys.argv) == 1 or ('--stdin' in sys.argv and len (sys.argv) != 2): - print "Usage:\n %s %s...\nor:\n %s --stdin" \ + if "--help" in sys.argv: + print "Usage:\n %s %s...\nor:\n %s\n\nWhen called with no arguments, input is read from standard input." \ % (sys.argv[0], mnemonic, sys.argv[0]) sys.exit (1) try: - if '--stdin' in sys.argv: - sys.argv.remove ('--stdin') + if len (sys.argv) == 1: while (1): line = sys.stdin.readline () if not len (line):