From: Junio C Hamano Date: Fri, 14 Oct 2011 18:07:26 +0000 (-0700) Subject: t7800: avoid arithmetic expansion notation X-Git-Tag: v1.7.8-rc0~29^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=15a31e78852f4ede5335552875006daeedfc3aa7;p=git.git t7800: avoid arithmetic expansion notation The construct "var=$(( something ..." is interpreted by some shells as arithmetic expansion, even when it clearly is not, e.g. var=$((foo; bar) | baz) Avoid the issue by giving an extra SP to help the parser, i.e. var=$( (foo; bar) | baz ) Noticed by Michael J Gruber. Signed-off-by: Junio C Hamano --- diff --git a/t/t7800-difftool.sh b/t/t7800-difftool.sh index 7fc2b3af8..4fb4c9384 100755 --- a/t/t7800-difftool.sh +++ b/t/t7800-difftool.sh @@ -289,7 +289,7 @@ test_expect_success PERL 'setup with 2 files different' ' ' test_expect_success PERL 'say no to the first file' ' - diff=$((echo n; echo) | git difftool -x cat branch) && + diff=$( (echo n; echo) | git difftool -x cat branch ) && echo "$diff" | stdin_contains m2 && echo "$diff" | stdin_contains br2 && @@ -298,7 +298,7 @@ test_expect_success PERL 'say no to the first file' ' ' test_expect_success PERL 'say no to the second file' ' - diff=$((echo; echo n) | git difftool -x cat branch) && + diff=$( (echo; echo n) | git difftool -x cat branch ) && echo "$diff" | stdin_contains master && echo "$diff" | stdin_contains branch &&