Mercurial > hg
diff tests/printenv.py @ 7080:a6477aa893b8
tests: Windows compatibility fixes
- printenv.py, md5sum.py, simplemerge, test-archive, test-merge1,
test-merge-symlinks: set standard streams to binary mode
- test-encode: replace "gunzip" by "gzip -d"
- test-hup: requires fifo
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 12 Oct 2008 19:11:59 +0200 |
parents | 7a7d4937272b |
children | f77c8d8331ca |
line wrap: on
line diff
--- a/tests/printenv.py Sun Oct 12 19:11:56 2008 +0200 +++ b/tests/printenv.py Sun Oct 12 19:11:59 2008 +0200 @@ -16,6 +16,14 @@ import os import sys +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 + exitcode = 0 out = sys.stdout