# HG changeset patch
# User Yuya Nishihara <y...@tcha.org>
# Date 1520193237 18000
#      Sun Mar 04 14:53:57 2018 -0500
# Branch stable
# Node ID f89bc48f38c7d87e0810e9308e58bdf6ea565695
# Parent  9a08f7d18c207c590bab631b6daeb5ecfcb6d4b0
test-annotate: set stdin and stdout to binary to get CR unmodified

diff --git a/tests/test-annotate.t b/tests/test-annotate.t
--- a/tests/test-annotate.t
+++ b/tests/test-annotate.t
@@ -903,6 +903,9 @@ Annotate with orphaned CR (issue5798)
 
   $ 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]'))
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to