Re: [RFC PATCH 08/13] test-reach: test reduce_heads()
- From
Stefan Beller <sbeller@google.com>
- Date
- Jun 29, 2018, 22:06 UTC
- Message-ID
- <CAGZ79kafYmpzYws7WQJO4-zmWwTBo9Pwo-PpkbmJF+Z9GzsvZA@mail.gmail.com>
- In-Reply-To
- <20180629161223.229661-9-dstolee@microsoft.com>
On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee <dstolee@microsoft.com> wrote:
Show 31 quoted lines
> > Signed-off-by: Derrick Stolee <dstolee@microsoft.com> > --- > t/t6600-test-reach.sh | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/t/t6600-test-reach.sh b/t/t6600-test-reach.sh > index c9337b6b46..0f60db9c60 100755 > --- a/t/t6600-test-reach.sh > +++ b/t/t6600-test-reach.sh > @@ -78,4 +78,30 @@ test_expect_success 'ref_newer:miss' ' > test_reach_two_modes "ref_newer" > ' > > +test_expect_success 'reduce_heads' ' > + cat >input <<- EOF && > + X:commit-1-10 > + X:commit-2-8 > + X:commit-3-6 > + X:commit-4-4 > + X:commit-1-7 > + X:commit-2-5 > + X:commit-3-3 > + X:commit-5-1 > + Y:commit-10-10 > + Y:commit-3-10 > + Y:commit-9-9 > + Y:commit-8-1 > + EOF > + printf "reduce_heads(X):\n" >expect && > + git rev-parse commit-5-1 >>expect &&
See 6ac767e5c00 (t6036, t6042: prefer test_cmp to sequences of test, 2018-05-24) on how to avoid some forks here:
git rev-parse >expect \
many HEADs or Tips &&