git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/3] t7406: fix here-doc syntax errors

From
Stefan Beller <sbeller@google.com>
Date
Mar 22, 2017, 21:32 UTC
Message-ID
<CAGZ79kafNKwfLhE1nXyt5mc5-D-kdxRxDP9pV7gc3btvjiHV7Q@mail.gmail.com>
In-Reply-To
<20170322210733.ohb7duy7bmmon6ny@sigill.intra.peff.net>
On Wed, Mar 22, 2017 at 2:07 PM, Jeff King <peff@peff.net> wrote:
Show 26 quoted lines
> On Wed, Mar 22, 2017 at 01:08:04PM -0700, Junio C Hamano wrote:
>
>> diff --git a/t/t7406-submodule-update.sh b/t/t7406-submodule-update.sh
>> index 347857fa7c..a20df9420a 100755
>> --- a/t/t7406-submodule-update.sh
>> +++ b/t/t7406-submodule-update.sh
>> @@ -442,9 +442,9 @@ test_expect_success 'submodule update - command in .git/config catches failure -
>>  '
>>
>>  test_expect_success 'submodule update - command run for initial population of submodule' '
>> -     cat <<-\ EOF >expect
>> +     cat >expect <<-\EOF &&
>>       Execution of '\''false $submodulesha1'\'' failed in submodule path '\''submodule'\''
>> -     EOF &&
>> +     EOF
>
> After applying this, I get a failure:
>
>   --- expect    2017-03-22 21:01:53.350721155 +0000
>   +++ actual    2017-03-22 21:01:53.346721155 +0000
>   @@ -1 +1 @@
>   -Execution of 'false $submodulesha1' failed in submodule path 'submodule'
>   +Execution of 'false 4301fd3e4110d3b6212c19aed3094150392545b9' failed in submodule path '../submodule'
>
> At the very least, we need to drop the "\" from EOF to expand
> $submodulesha1.
yes.
> But the submodule path seems wrong, too. I'm not sure if
> the expectation is wrong, or if there's a bug. +cc Stefan

Yes the actual output is wrong, too. But that is not because Git is wrong, but the test suite is.

    test_must_fail git -C super submodule update >../actual &&
contains 2 errors:
* we are interested in stderr, so make it 2>
* the -C switch doesn't apply to redirection. (obviously!)
  So if you have run the test suite in a normal setup, you may have
  a file "t/actual" which is empty. This is scary as it managed to break
  out of the test suite and overwrote a potential file in your git.git.
I'll send a patch on top of the one under discussion momentarily.

Thanks, Stefan

Previous: Jeff KingNext: Jeff King
Message 10 of 46 in “EOF test fixes (t5615/t7004)”
  1. Jan PalusMar 22, 2017
  2. Jan PalusMar 22, 2017
  3. Stefan BellerMar 22, 2017
  4. Junio C HamanoMar 22, 2017
  5. 0/3 fix "here-doc" syntax errorsJunio C Hamano, Mar 22, 2017
  6. 1/3 t5615: fix a here-doc syntax errorJunio C Hamano, Mar 22, 2017
  7. Jeff KingMar 22, 2017
  8. 2/3 t7406: fix here-doc syntax errorsJunio C Hamano, Mar 22, 2017
  9. Jeff KingMar 22, 2017
  10. Stefan BellerMar 22, 2017
  11. Jeff KingMar 22, 2017
  12. t7406: correct test case for submodule-update initial populationStefan Beller, Mar 22, 2017
  13. Jeff KingMar 22, 2017
  14. Stefan BellerMar 22, 2017
  15. Jeff KingMar 22, 2017
  16. Jonathan NiederMar 22, 2017
  17. Junio C HamanoMar 22, 2017
  18. Jeff KingMar 22, 2017
  19. Stefan BellerMar 22, 2017
  20. Junio C HamanoMar 22, 2017
  21. 3/3 t7004, t7030: fix here-doc syntax errorsJunio C Hamano, Mar 22, 2017
  22. Jeff KingMar 22, 2017
  23. Santiago TorresMar 22, 2017
  24. Jeff KingMar 22, 2017
  25. Junio C HamanoMar 22, 2017
  26. Santiago TorresMar 22, 2017
  27. Jeff KingMar 22, 2017
  28. Santiago TorresMar 22, 2017
  29. Jeff KingMar 22, 2017
  30. Junio C HamanoMar 22, 2017
  31. Santiago TorresMar 22, 2017
  32. Junio C HamanoMar 23, 2017
  33. Santiago TorresMar 23, 2017
  34. Jeff KingMar 23, 2017
  35. Junio C HamanoMar 24, 2017
  36. Jeff KingMar 24, 2017
  37. Junio C HamanoMar 24, 2017
  38. Jeff KingMar 24, 2017
  39. Jeff KingMar 24, 2017
  40. Junio C HamanoMar 22, 2017
  41. Jan PalusMar 22, 2017
  42. tests: lint for run-away here-docJunio C Hamano, Mar 23, 2017
  43. Junio C HamanoMar 23, 2017
  44. Jonathan NiederMar 24, 2017
  45. Junio C HamanoMar 24, 2017
  46. Jeff KingMar 24, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.