Re: [PATCH] Add test for git rebase --abort

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Feb 29, 2008 at 03:26:01PM -0800, Junio C Hamano wrote:
> Mike Hommey <mh@xxxxxxxxxxxx> writes:
> 
> >  The failing test is the third. I don't have enough knowledge in git-rebase
> >  to write an appropriate fix, but the problem seems to be in
> >  move_to_original_branch, where testing head_name doesn't seem appropriate.
> 
> Please mark such an "expected to succeed but fails due to
> suspected bug" with test_expect_failure.

I was kind of expecting the bug would be fixed before the test be
included ;)

> > +test_expect_success 'rebase --abort' '
> > +	! git rebase master &&
> 
> When making sure "git frotz" refuses gracefully (instead of
> segfault-and-burn), please say "test_must_fail git frotz".

Ooooh, I just saw 74359821.

> > +# In case previous test failed
> > +git reset --hard pre-rebase >&3 2>&4
> > +rm -rf .dotest # Should be changed whenever rebase stop using .dotest
> 
> Have this kind of clean-up at the very beginning of the next
> test.  Test writers should not have to learn about file
> descriptors 3 and 4.
> 
>         Side note.  As a test framework extension, we might want
>         to add 4th parameter to test_expect_{success,failure}
>         that specifies a clean-up to be made regardless of the
>         outcome of the test.
> 
> > +test_expect_success 'rebase --abort after --skip' '
> > +	! git rebase master &&
> > +	! git rebase --skip &&
> > +	test $(git rev-parse HEAD) = $(git rev-parse master) &&
> > +	sh -x ../../git-rebase --abort &&
> > +	test $(git rev-parse to-rebase) = $(git rev-parse pre-rebase)
> > +'
> 
> I take that "sh -x ../../" is not for inclusion in the official
> release.

D'oh, I forgot to change that back.

Mike
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux