Re: [PATCH 1/6] git-p4 tests: refactor and cleanup
- From
Stefano Lattarini <stefano.lattarini@gmail.com>
- Date
- Oct 16, 2011, 09:54 UTC
- 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:
Show 7 quoted lines
> > 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: <http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_04>
So, since the git testsuite explicitly requires a POSIX shell, there is probably nothing to fix here.
Sorry for the noise, Stefano