[PATCH] t7406: correct test case for submodule-update initial population

2017-03-22 Thread Stefan Beller
There are three issues with the test: * The syntax of the here-doc was wrong, such that the entire test was sucked into the here-doc, which is why the test succeeded successfully. * The variable $submodulesha1 was not expanded as it was inside a single quoted string. Use double quote to expan

Re: [PATCH] t7406: correct test case for submodule-update initial population

2017-03-22 Thread Jeff King
On Wed, Mar 22, 2017 at 02:49:48PM -0700, Stefan Beller wrote: > * The syntax of the here-doc was wrong, such that the entire test was > sucked into the here-doc, which is why the test succeeded successfully. As opposed to succeeding unsuccessfully? :) > * The variable $submodulesha1 was not e

Re: [PATCH] t7406: correct test case for submodule-update initial population

2017-03-22 Thread Stefan Beller
On Wed, Mar 22, 2017 at 2:59 PM, Jeff King wrote: > On Wed, Mar 22, 2017 at 02:49:48PM -0700, Stefan Beller wrote: > >> * The syntax of the here-doc was wrong, such that the entire test was >> sucked into the here-doc, which is why the test succeeded successfully. > > As opposed to succeeding un

Re: [PATCH] t7406: correct test case for submodule-update initial population

2017-03-22 Thread Jeff King
On Wed, Mar 22, 2017 at 03:07:45PM -0700, Stefan Beller wrote: > > Neither of those is true, but I think: > > > > cat >expect <<-EOF && > > Execution of '\''false $submodulesha1'\'' failed in ... > > EOF > > > > is safer and less surprising. The single-quote handling is unfortunate and > > u

Re: [PATCH] t7406: correct test case for submodule-update initial population

2017-03-22 Thread Junio C Hamano
Jeff King writes: > Neither of those is true, but I think: > > cat >expect <<-EOF && > Execution of '\''false $submodulesha1'\'' failed in ... > EOF > > is safer and less surprising. The single-quote handling is unfortunate and > ugly, but necessary to get them into the shell snippet in the

Re: [PATCH] t7406: correct test case for submodule-update initial population

2017-03-22 Thread Jonathan Nieder
Stefan Beller wrote: > On Wed, Mar 22, 2017 at 2:59 PM, Jeff King wrote: >> sq=\' >> test_expect_success '...' ' >> cat >expect <<-EOF >> Execution of ${sq}false $submodulesha1${sq} ... >> ' >> >> but I'm not sure if that is any more readable. > > If I recall correctly, I ma

Re: [PATCH] t7406: correct test case for submodule-update initial population

2017-03-22 Thread Jeff King
On Wed, Mar 22, 2017 at 03:12:07PM -0700, Junio C Hamano wrote: > > sq=\' > > test_expect_success '...' ' > > cat >expect <<-EOF > > Execution of ${sq}false $submodulesha1${sq} ... > > ' > > > > but I'm not sure if that is any more readable. > > Yup, my eyes have long learned to coa

Re: [PATCH] t7406: correct test case for submodule-update initial population

2017-03-22 Thread Stefan Beller
On Wed, Mar 22, 2017 at 3:24 PM, Jeff King wrote: > On Wed, Mar 22, 2017 at 03:12:07PM -0700, Junio C Hamano wrote: > >> > sq=\' >> > test_expect_success '...' ' >> > cat >expect <<-EOF >> > Execution of ${sq}false $submodulesha1${sq} ... >> > ' >> > >> > but I'm not sure if that is