Re: [PATCH 3/7] add a test for semantic errors in config files
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jul 23, 2014, 19:55 UTC
- Message-ID
- <vpq38drvohr.fsf@anie.imag.fr>
- In-Reply-To
- <1406140978-9472-4-git-send-email-tanayabh@gmail.com>
Tanay Abhra <tanayabh@gmail.com> writes:
Show 8 quoted lines
> +test_expect_success 'check line errors for malformed values' ' > + cp .git/config .git/config.old && > + test_when_finished "mv .git/config.old .git/config" && > + echo "[alias]\n br" >.git/config && > + test_expect_code 128 git br 2>result && > + grep "fatal: bad config file line 2 in .git/config" result > +' > +
The test fails at this point in history. I guess the problem will disapear once you've put PATCH 2 at the right point in the series.
Another option is to mark the test as test_expect_failure when you introduce it, and change it to test_expect_success when you fix it (probably not applicable here, but it's a trick I find elegant).
-- Matthieu Moy http://www-verimag.imag.fr/~moy/