tests/test-mq-eol.t
changeset 41329 84707d9e77a0
parent 39707 5abc47d4ca6b
child 41550 7295279b9ea5
--- a/tests/test-mq-eol.t	Wed Jan 23 17:41:46 2019 -0800
+++ b/tests/test-mq-eol.t	Wed Jan 23 17:45:11 2019 -0800
@@ -30,10 +30,14 @@
 
   $ cat > cateol.py <<EOF
   > import sys
+  > try:
+  >     stdout = sys.stdout.buffer
+  > except AttributeError:
+  >     stdout = sys.stdout
   > for line in open(sys.argv[1], 'rb'):
   >     line = line.replace(b'\r', b'<CR>')
   >     line = line.replace(b'\n', b'<LF>')
-  >     print(line)
+  >     stdout.write(line + b'\n')
   > EOF
 
   $ hg init repo