[PATCH STABLE] test-annotate: set stdin and stdout to binary to get CR unmodified
Yuya Nishihara
yuya at tcha.org
Sun Mar 4 20:05:53 UTC 2018
# HG changeset patch
# User Yuya Nishihara <yuya at 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]'))
More information about the Mercurial-devel
mailing list