From: Junio C Hamano Date: Tue, 06 Jul 2010 02:35:44 GMT Subject: Re: [PATCH v4 7/7] t/README: Document the do's and don'ts of tests Message-ID: <7vaaq58hhb.fsf@alter.siamese.dyndns.org> In-Reply-To: <1278082789-19872-8-git-send-email-avarab@gmail.com> Ævar Arnfjörð Bjarmason writes: > +Do's, don'ts & things to keep in mind > +------------------------------------- > + > +Here's a few examples of things you probably should and shouldn't do > +when writing tests. "Here are" perhaps? > +Do: > + > + - Put as much code as possible inside test_expect_success and other > + assertions. > + > + Even code that isn't a test per se, but merely some setup code > + should be inside a test assertion if at all possible. Test scripts > + should only have trivial code outside of their assertions. Let's make it even stronger; "should only have trivial" -> "shouldn't have any ... unless there is a good reason." > +Don't: > + > + - exit() within a