[PATCH STABLE] tests-subrepo-git: make the "pwned" message output in a stable order

timeless timeless at gmail.com
Fri May 27 13:33:45 EDT 2016


On Fri, May 27, 2016 at 1:21 PM, Danek Duvall <danek.duvall at oracle.com> wrote:
> Kevin Bullock wrote:
>> And as timeless pointed out, it should be empty on a correct system.
>
> Perhaps I'm not understanding the test properly, but I don't think that's
> correct.  Is my explanation flawed?
>
> Never mind that I've no idea how you'd test both (either?) with a broken
> git and (or) a fixed one.

Build a modern version of git and add it to your path before
everything else. Then try running the current tests. You shouldn't get
a test failure.

i.e. `pwned` shouldn't appear.

That's the definition of "passing" the test. And it's how the tests
should pass after you improve them too (i.e. having no difference
between expected output and actual output, and not showing pwned).

Failing (showing pwned, having a difference from the expected output)
is expected for people (like me) running an old version of git.

Yes, it's awkward to be designing a test around the output from an old
version of git, but recording the output from a new version of git,
but that's what should be done.


More information about the Mercurial-devel mailing list