changeset 36698:52b344e977b7 stable

test-annotate: set stdin and stdout to binary to get CR unmodified
author Yuya Nishihara <yuya@tcha.org>
date Sun, 04 Mar 2018 14:53:57 -0500
parents 9a08f7d18c20
children 4e41b59633fa
files tests/test-annotate.t
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-annotate.t	Sun Mar 04 13:19:05 2018 -0500
+++ b/tests/test-annotate.t	Sun Mar 04 14:53:57 2018 -0500
@@ -903,6 +903,9 @@
 
   $ cat <<'EOF' >> "$TESTTMP/substcr.py"
   > import sys
+  > from mercurial import util
+  > util.setbinary(sys.stdin)
+  > util.setbinary(sys.stdout)
   > stdin = getattr(sys.stdin, 'buffer', sys.stdin)
   > stdout = getattr(sys.stdout, 'buffer', sys.stdout)
   > stdout.write(stdin.read().replace(b'\r', b'[CR]'))