[PATCH 01 of 14] tests: roll test-committer.t into test-commit.t

Idan Kamara idankk86 at gmail.com
Fri Jun 8 13:21:24 CDT 2012


On Fri, Jun 8, 2012 at 9:04 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>
> On 2012-06-08 19:17, Kevin Bullock wrote:
> > On Jun 8, 2012, at 12:02 PM, Adrian Buehlmann wrote:
> >
> >> On 2012-06-08 18:07, Martin Geisler wrote:
> >>>> diff --git a/tests/test-commit.t b/tests/test-commit.t
> >>>> --- a/tests/test-commit.t
> >>>> +++ b/tests/test-commit.t
> >>>> @@ -106,7 +106,8 @@
> >>>>   [255]
> >>>>
> >>>>   $ cd ..
> >>>> -
> >>>> +  $ pwd
> >>>> +  $TESTTMP
> >>>
> >>> Is this there on purpose? I don't see what it tests.
> >>>
> >>
> >> It is on purpose.
> >>
> >> Some tests had errors with incorrectly matched cd of the sort
> >>
> >>   $ cd foo
> >>   ...
> >>   $ cd ..
> >>   ...
> >>   $ cd ..
> >>
> >> which resultet in cd'ing way too high up. That check makes sure that
> >> this doesn't happen again if someone edits the test later on.
> >
> > Others may have a different opinion on this, but this is the sort of
> > thing I'd put in while combining the tests, then take out again before
> > submitting the patch.
>
> But that would fail to protect against creating that error again, which
> can easily happen if that file is edited again (not just by myself).

If this is really necessary (what happens if the test ends in the wrong
dir anyway?), injecting it to the end of .t tests from run-tests might be
nicer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120608/e104b634/attachment.html>


More information about the Mercurial-devel mailing list