Skip to contentSkip to conversation

mingw: fix the shortlog --output=<file> test

PATCH New Johannes Schindelin 1 participant 1 message Jul 11, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mingw: fix the shortlog --output=<file> test

Adjust t4201 to pass on Windows; a couple of test cases need to be skipped on Windows which leads to a different shortlog than on Linux.

Let's just fix that by limiting the shortlog's commit range to traverse only one commit: that guarantees that it does not matter how many test cases were skipped.

---

On Fri, 8 Jul 2016, Junio C Hamano wrote:

> * js/log-to-diffopt-file (2016-06-28) 11 commits
> (merged to 'next' on 2016-07-06 at 39e7a5f)
> + diff: do not color output when --color=auto and --output=<file>
> is given
> + t4211: ensure that log respects --output=<file>
> + shortlog: respect the --output=<file> setting

Dang it! My original test series was well-tested on Linux *and* on Windows. Over the course of the iterations, Windows support broke.

My apologies for not catching this earlier.

 t/t4201-shortlog.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
t/t4201-shortlog.sh +2 -2
index bd699e1..ae08b57 100755
@@ -185,9 +185,9 @@ test_expect_success 'shortlog with revision pseudo options' '
 '
 
 test_expect_success 'shortlog with --output=<file>' '
-	git shortlog --output=shortlog master >output &&
+	git shortlog --output=shortlog -1 master >output &&
 	test ! -s output &&
-	test_line_count = 7 shortlog
+	test_line_count = 3 shortlog
 '
 
 test_done
Signature · 1 line
2.9.0.278.g1caae67