# HG changeset patch # User Matt Mackall # Date 1407859350 18000 # Node ID 68a7ef4311ce007715c7b415634f8a2a8a970c20 # Parent e5dfa8689cf09c701304a4d8e7aad7e326489877 run-tests: self-test on Windows needs binary streams diff -r e5dfa8689cf0 -r 68a7ef4311ce tests/run-tests.py --- a/tests/run-tests.py Tue Aug 12 02:40:42 2014 -0500 +++ b/tests/run-tests.py Tue Aug 12 11:02:30 2014 -0500 @@ -1820,4 +1820,13 @@ if __name__ == '__main__': runner = TestRunner() + + try: + import msvcrt + msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY) + msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY) + msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY) + except ImportError: + pass + sys.exit(runner.run(sys.argv[1:]))