test-annotate: set stdin and stdout to binary to get CR unmodified stable
authorYuya Nishihara <yuya@tcha.org>
Sun, 04 Mar 2018 14:53:57 -0500
branchstable
changeset 36698 52b344e977b7
parent 36697 9a08f7d18c20
child 36742 4e41b59633fa
test-annotate: set stdin and stdout to binary to get CR unmodified
tests/test-annotate.t
--- 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]'))