[PATCH STABLE] test-annotate: set stdin and stdout to binary to get CR unmodified

Augie Fackler raf at durin42.com
Sun Mar 4 15:30:35 EST 2018



> On Mar 4, 2018, at 15:05, Yuya Nishihara <yuya at tcha.org> wrote:
> 
> # 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

queued, thanks

> 
> 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 at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel



More information about the Mercurial-devel mailing list