[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: problem with xml tests

From: Mark Benedetto King <bking_at_answerfriend.com>
Date: 2002-01-21 21:28:42 CET

On Mon, Jan 21, 2002 at 12:00:51PM -0800, Greg Stein wrote:
> On Mon, Jan 21, 2002 at 02:29:28PM -0500, Garrett Rooney wrote:
> > since the changes to support builddir != srcdir in the tests,
> > svn-test.sh and svn-test2.sh have been giving me errors. they still
> > succeeded, but the shell scripts weren't entirely correct.
> >
> > i just got a chance to look closer, and it turns out they are passing
> > the '==' operator to [, which is not a valid operator on FreeBSD. to
> > be portable, we should be using =, not ==.
> >
> > here's a patch.
>
> +1
>
> Although, I seem to recall that the most portable form is:
>
> if test "$foo" = "bar"; then
>

Well, if you want to be really safe, you might want to do

if test "X$foo" = "Xbar"; then

so that values of $foo that begin with "-" don't scare
broken implementations of test.

--ben

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:57 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.