Re: [PATCH v4] format-patch: introduce format.outputDirectory configuration
From: Eric Sunshine <hidden>
Date: 2016-06-15 23:07:41
On Sun, Jan 10, 2016 at 10:55 PM, Eric Sunshine [off-list ref] wrote:
On Sun, Jan 10, 2016 at 7:30 PM, Stephen P. Smith [off-list ref] wrote:quoted
diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh@@ -1445,4 +1445,20 @@ test_expect_success 'From line has expected format' ' +test_expect_success 'format-patch format.outputDirectory option' ' + test_config format.outputDirectory patches && + rm -fr patches && + git format-patch master..side && + ls patches >actual && + test_line_count = 3 actual +'Now that you've moved the new tests to the bottom of the script, this test fails. This is because, at this point, there are 18 commits in the range 'master..side', not 3 as when the test was at the top of the script. You could change the 3 to an 18, however, that would be fragile: if someone inserts or modifies tests above this one, then a hard-coded 18 might become stale. One possible fix would be: test $(git rev-list master..side | wc -l) -eq $(ls patches)
That would be $(ls patches | wc -l), of course.