Unified tests: what if I don't care about the exit status?

Greg Ward greg at gerg.ca
Thu Dec 2 21:36:33 CST 2010

I'm in the middle of converting the bfiles test suite to unified
tests.  So far I love it.  But now the tests fail on Mercurial 1.4 and
1.5 because the exit status of "hg remove" has changed slightly.  (On
1.6 and up, it exits 1 if you try to remove an untracked file;
pre-1.6, that was exit 0.)

I don't *care* about the exit status of "hg remove".  I just want to
test bfiles.  But I don't see a way to completely ignore a line of
actual vs. expected output.

Am I missing something?  Thanks --


P.S. you can see a test failure here:
versus a successful run:

The test that's causing me problems is

and the relevant bit of code:

hg forget, hg remove not confused by auto-status
  $ hg forget big1
  not removing big1: file is already untracked
  [1]           << DON'T CARE
  $ hg forget normal1
  $ hg remove normal3
  $ hg remove big3
  not removing big3: file is untracked
  [1]           << DON'T CARE

More information about the Mercurial-devel mailing list