Re: [PATCH v9 2/5] t4205: revert back single quotes
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 5, 2013, 07:07 UTC
- Message-ID
- <7v61wpa3j6.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <b7ac1f5c14ab4571f06030ab02a33b1489ab4dcd.1372939482.git.Alex.Crezoff@gmail.com>
Alexey Shumkin <alex.crezoff@gmail.com> writes:
> In previuos commit de6029a2d7734a93a9e27b9c4471862a47dd8123 single > quotes were replaced with double quotes to make "$(commit_msg)" > expression in heredoc to work. The same effect can be achieved by using > "EOF" as a heredoc delimiter instead of "\EOF".
OK.
Show 16 quoted lines
> -test_expect_success 'left alignment formatting' " > - git log --pretty='format:%<(40)%s' >actual && > +test_expect_success 'left alignment formatting' ' > + git log --pretty="format:%<(40)%s" >actual && > # complete the incomplete line at the end > echo >>actual && > - qz_to_tab_space <<\EOF >expected && > + qz_to_tab_space <<EOF >expected && > message two Z > message one Z > add bar Z > $(commit_msg) Z > EOF > test_cmp expected actual > -" > +'
A subtle difference is that a call to commit_msg is made when the test is actually run, not when the test script is prepared to be passed (as a parameter) to test_expect_success helper. I think the result of applying this patch, i.e. running $(commit_msg) inside the test, is easier to read and understand.