Re: [PATCH v3] ls-files: update test style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"lilinchao@xxxxxxxxxx" <lilinchao@xxxxxxxxxx> writes:

>>Mention end of here-document marker should by default be quoted,
>>unless the body needs $variable_interpolation? 
> Sorry, I don't get it. I don't see many of ending "EOF" are quoted in our tests.

We encourage to quote the end marker when there is no interpolation
in the here-document, so that ones that do not quote can stand out
and grab attention by developers who are reading the tests, i.e.

	cmd <<-EOF
	$variable interpolated
	EOF

The fact that EOF is not quoted serves as a signal to readers that
they may want to inspect the here-doc text carefully with the
variable interpolation in mind.  If the EOF marker is quoted,

	cmd <<-\EOF
	literal here text
	EOF

even if there are many lines in the here-document, the readers may
not have to be so careful---what is used is what they see (modulo
removing the leading indentation tabs).





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux