Patchwork test-diff-color: disable pager for expected output on Windows (issue5555)

login
register
mail settings
Submitter Matt Harbison
Date May 3, 2017, 2:41 a.m.
Message ID <2d3a98e349f8514ad532.1493779279@Envy>
Download mbox | patch
Permalink /patch/20392/
State Accepted
Headers show

Comments

Matt Harbison - May 3, 2017, 2:41 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1493778369 14400
#      Tue May 02 22:26:09 2017 -0400
# Node ID 2d3a98e349f8514ad532c69ff7d380a0117d7123
# Parent  6cacc271ee0a9385be483314dc73be176a13c891
test-diff-color: disable pager for expected output on Windows (issue5555)

Windows uses `more.com`, which unhelpfully adds an extra trailing line
consisting only of '\r'.  It also converts tab characters to spaces, which
throws off the last two tests.

Setting the 'ui.formatted' option is what allowed the pager to be used by these
tests in the first place.
Yuya Nishihara - May 3, 2017, 2:52 a.m.
On Tue, 02 May 2017 22:41:19 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1493778369 14400
> #      Tue May 02 22:26:09 2017 -0400
> # Node ID 2d3a98e349f8514ad532c69ff7d380a0117d7123
> # Parent  6cacc271ee0a9385be483314dc73be176a13c891
> test-diff-color: disable pager for expected output on Windows (issue5555)

Good catch. Queued for stable, thanks.

Patch

diff --git a/tests/test-diff-color.t b/tests/test-diff-color.t
--- a/tests/test-diff-color.t
+++ b/tests/test-diff-color.t
@@ -4,6 +4,7 @@ 
   > [ui]
   > color = yes
   > formatted = always
+  > paginate = never
   > [color]
   > mode = ansi
   > EOF