Re: [PATCH 8/7] syntax-check: fix violations and implement sc_useless_quotes_in_case_branch.

2011-11-22 Thread Gary V. Vaughan
Hi Eric, On 22 Nov 2011, at 12:09, Gary V. Vaughan wrote: On 21 Nov 2011, at 23:15, Eric Blake wrote: On 11/21/2011 07:47 AM, Gary V. Vaughan wrote: Contrary to popular belief, Bourne shell does not resplit case expressions after expansion, so if there are no shell unquoted shell

Re: [PATCH 6/7] syntax-check: fix violations and implement sc_prohibit_test_const_follows_var.

2011-11-22 Thread Stefano Lattarini
[adding bug-autoconf in CC] On Tuesday 22 November 2011, Gary V wrote: Hi Eric, On 22 Nov 2011, at 03:07, Eric Blake wrote: On 11/21/2011 07:47 AM, Gary V. Vaughan wrote: To safely use a non-literal first argument to `test', you must always prepend a literal non-`-' character, but

Re: [PATCH 3/7] tests: migrate tests/sh.test checks to syntax-checks.

2011-11-22 Thread Stefano Lattarini
On Tuesday 22 November 2011, Gary V wrote: Hi Stefano, On 22 Nov 2011, at 02:52, Stefano Lattarini wrote: Hi Gary. Just a quick nit (I haven't looked at the whole series, and not even at the whole patch in fact; sorry). No apologies necessary, every little helps! Thank you. On

Re: [PATCH 6/7] syntax-check: fix violations and implement sc_prohibit_test_const_follows_var.

2011-11-22 Thread Eric Blake
On 11/22/2011 02:02 AM, Stefano Lattarini wrote: test a = $b is just as likely to trigger improper evaluation in buggy test(1) implementations as: test $b = a :-o For real? On non-museum pieces? Okay, you've convinced me otherwise. It looks like even buggy versions of test(1) at least

Re: [PATCH 8/7] syntax-check: fix violations and implement sc_useless_quotes_in_case_branch.

2011-11-22 Thread Eric Blake
On 11/22/2011 01:21 AM, Gary V. Vaughan wrote: Likewise in the pattern expression; you could further change this to: case $lt_sysroot:$1 in ?*:$lt_sysroot*) Good call, although narrowing the search down to eliminate false positives is a lot trickier in this case! I'm adding the following

Re: [PATCH 6/7] syntax-check: fix violations and implement sc_prohibit_test_const_follows_var.

2011-11-22 Thread Stefano Lattarini
On Tuesday 22 November 2011, Eric Blake wrote: touch =; test -f =; echo $? This is problematic also with pdksh 5.2.14 on Debian: $ pdksh -c 'touch ./=; test -f =; echo $?' pdksh: test: =: missing second argument 2 and with /bin/sh on OpenBSD 4.6 as well: $ /bin/sh -c 'touch ./=; test