[darcs-users] can we get rid of perl requirement in our test suite?
Dan Pascu
dan at ag-projects.com
Mon May 25 09:05:21 UTC 2009
On Monday 18 May 2009, Eric Kow wrote:
> Hi Dan,
>
> On Fri, May 15, 2009 at 03:53:21 +0300, Dan Pascu wrote:
> > If you do not care about the char being 'a' and can use a file filled with
> > '0' instead, just remove the tr command to make it even faster:
> >
> > printf "%01048000d" 0
>
> This sounds like a simple portable solution. I don't think we
> particularly need the character to be 'a' either. Would you mind
> submitting a patch? It's tests/pull_binary.sh
No problem, I submitted the patch to the list.
>
> Help with the other two perlisms would also be nice, unless, Salvatore,
> you've already got a plan up your sleeves for that :-)
I wouldn't mind, but I have no idea what those constructs do. This kind of
cryptic syntax is what made me stay away from perl.
>
> tests/optimize_relink.sh: echo 'use File::Basename; $res=0; while
> ($fn=<'$1'/*>) { $fn2="'$2'/" . basename($fn); @fd1=lstat($fn);
> @fd2=lstat($fn2); $res += ($fd1[1] != $fd2[1]);}; exit($res);' | perl
>
> tests/pull_compl.sh: perl -i~ -pe "$1" foo
>
> It sounds like the latter can be replaced with some sed usage, which we
> already use in the test suite quite a bit.
--
Dan
More information about the darcs-users
mailing list