[darcs-users] darcs patch: Add a test for binary patch files.
Nicolas Pouillard
nicolas.pouillard at gmail.com
Sun Sep 7 16:09:19 UTC 2008
Excerpts from Eric Y. Kow's message of Sun Sep 07 13:43:56 +0200 2008:
> Tis test passes and seems to make sense, so I have fast-tracked it
> into stable.
>
> But do please have a look at tests/README.test_maintainers.txt for tips
> on improving tests.
>
> > +#!/bin/sh
>
> For some reason we have decided to switch to explicit uses of bash.
OK
> > +binary=mybinary.jpg
> > +function checkbinary(){
> > + cmp $binary ../temp1/$binary
> > +}
>
> The test suites is one place where we generally frown on highly factored
> code.
I don't plan to fall into highly factored shell code, believe me.
Here having a function is not much than having a variable so why not?
> I think one reason we avoid defining functions is to make it easy to
> determine where a test fails, and also to increase copy and pastability.
> I say this because I have written my fair share of 'factored' tests in
> darcs and paid the price of future "huh?" :-)
>
> > +test ! -e $binary
> > +darcs unrevert -a
> > +checkbinary
>
> I might also cleanup the tempdirs at the end.
OK
Patch sent!
--
Nicolas Pouillard aka Ertai
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080907/3499c7ec/attachment.pgp
More information about the darcs-users
mailing list