[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: empty test
From: |
Eric Blake |
Subject: |
Re: empty test |
Date: |
Sun, 09 Apr 2006 13:17:36 +0000 |
> > > * lib/autotest/general.m4 (_AT_CHECK): Avoid syntax error on empty
> > > check.
> >
> > That looks fine; please install. Thanks.
>
> Erm, instead of the
> :; $1
>
> could we just have
> m4_default([$1], [:])
>
> please? This avoids the size overhead incurred for the non-pathological
> case.
Except that with your idea, with AT_CHECK([ ]) (note the space), the m4_default
sees it as non-empty but shell syntax disagrees. I went the course of
minimally invasive patch, by always ensuring valid syntax (assuming, of course,
that the shell snippet handed to AT_CHECK is also valid outside of a subshell),
rather than trying to play m4 games to guess when syntax is valid. Of course,
how we handle something like AT_CHECK([;]) is up in the air, since by itself,
";"
is not valid as a script outside of a subshell, nor would it be valid with
either
of our proposals.
--
Eric Blake
- empty test, Eric Blake, 2006/04/08
- Re: empty test,
Eric Blake <=