From: Matthieu Moy Date: Wed, 23 Jul 2014 19:55:44 GMT Subject: Re: [PATCH 3/7] add a test for semantic errors in config files Message-ID: In-Reply-To: <1406140978-9472-4-git-send-email-tanayabh@gmail.com> Tanay Abhra writes: > +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/