Re: [PATCH 3/4] t7401: ensure uniformity in the '--for-status' test
From: Junio C Hamano <hidden>
Date: 2020-08-06 17:19:38
Shourya Shukla [off-list ref] writes:
On 05/08 02:30, Junio C Hamano wrote:quoted
Shourya Shukla [off-list ref] writes:quoted
The '--for-status' test got its expected output from stdin. This is inconsistent with the other tests in the test script which get their expected output from a file named 'expected'. So, change the syntax of the '--for-status' test for uniformity.There are a handful examples in t5401 and another one in t3700 that give the "golden master" from the standard input. When the expected output is used only once, I do not think it is particularlly bad to have it this way. So,... meh?I realised what you were trying to say after checking out t5400 and t3700. I understand that this change may not be immediately needed but I think it does make reading the diff a bit easier since having a '-' as a file name does get a bit confusing when reading the output.
If so, perhaps justifying the change based on that, not on
"consistency", would be a good idea.
Side note: But would that mean you'd find it "confusing" to
read output from 3700 and 5400? Would "test writers should
get used to it" be a workable alternative solution?
Since "test_cmp expect actual" and "test_cmp - actual <<HERE" are
_both_ valid forms that are useful for different situations, I do
not see a compelling reason to insist on one form is consistently
used and ban the use of the other.
So...