From: Stefano Lattarini Date: Sun, 16 Oct 2011 09:54:11 GMT Subject: Re: [PATCH 1/6] git-p4 tests: refactor and cleanup Message-ID: <201110161154.11898.stefano.lattarini@gmail.com> In-Reply-To: <201110161138.58396.stefano.lattarini@gmail.com> OK, I have to partially correct myself here ... On Sunday 16 October 2011, Stefano Lattarini wrote: > > This won't work with older versions of the Almquist shell (without > prepending `testid' and `git_p4_test_start' with a `$', that is): > > $ ash-0.5.2 -c 'a=4; b=2; echo $(( 1 + (a - b) ))' > ash-0.5.2: arith: syntax error: " 1 + (a - b) " > OTOH, this behaviour seems in contrast with the POSIX standard, which says that: ``If the shell variable x contains a value that forms a valid integer constant, then the arithmetic expansions "$((x))" and "$(($x))" shall return the same value.'' Reference: So, since the git testsuite explicitly requires a POSIX shell, there is probably nothing to fix here. Sorry for the noise, Stefano