Thread (1 message) 1 message, 1 author, 2016-06-15

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:24

Ivan Todoroski [off-list ref] 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.
quoted
quoted
+
+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.
quoted
 - Do not place the command you are testing that might crash on the
   upstream of the pipe;

 - style;
Noted.
quoted
	(
		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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help