From: Junio C Hamano Date: Tue, 27 Mar 2012 23:43:08 GMT Subject: Re: [PATCH/RFC v2 3/4] fetch-pack: test cases for the new --stdin option Message-ID: <7vsjgty5ir.fsf@alter.siamese.dyndns.org> In-Reply-To: <4F724F0D.7000602@gmx.net> Ivan Todoroski 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.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.