Re: [PATCH/RFC v2 3/4] fetch-pack: test cases for the new --stdin option

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

 



Ivan Todoroski <grnch@xxxxxxx> writes:

> On second thought, maybe we can just drop these two --stateless-rpc
> tests from this patch? The "git clone" test in the next patch also
> exercises the packetized refs in --stateless-rpc mode and if there was
> anything wrong with them it would fail.

Yeah, I was thinking about the same.

>>> +
>>> +test_expect_success 'fetch refs from cmdline, make sure it still works OK' '
>>> +	cd client &&
>>> +	git fetch-pack --no-progress .. $(cat ../stdin.exp) |
>>> +	cut -d " " -f 2 > ../stdin.act &&
>>> +	cd .. &&
>>> +	test_cmp stdin.exp stdin.act
>>> +'
>>
>>  - Do not chdir around without being in a subprocess ();
>
> Sorry, I didn't realize the tests were eval-ed in the current
> environment. I will correct all such problems in the next version.
>
>>  - Do not place the command you are testing that might crash on the
>>    upstream of the pipe;
>>
>>  - style;
>
> Noted.
>
>> 	(
>> 		cd client &&
>>                 git fetch-pack ... <../stdin.exp >stdin.raw
>> 	) &&
>> 	cut -d " " -f 2 <stdin.raw | sort >stdin.act &&
>> 	test_cmp stdin.exp stdin.act
>>
>> By the way, why are these not called "expect" and "actual" like most other
>> tests?
>
> The test files I worked with used the shorter exp/act convention so I
> followed that.
>
> Or are you wondering about the "stdin." prefix I added?

No.  I was referring to just that these two files were not literally named
"expect"/"actual", and I was lazy to look beyond what was in the patch
context ;-).  If the surrounding tests uses exp/act, mimicking them in
this patch is a good idea (we may want to fix them later but that is a
separate topic, and should not be done in this patch).

Thanks.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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]