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

Re: [PATCH 8/8] Fix tests breaking when checkout path contains shell metacharacters

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:44:28

Johannes Sixt [off-list ref] writes:
quoted
quoted
quoted
 test_expect_success  ".rev_db auto-converted to .rev_map.UUID" "
 	git-svn fetch -i trunk &&
+	test -z \"\$(ls \"\$GIT_DIR\"/svn/trunk/.rev_db.* 2>/dev/null)\" &&
+	expect=\"\$(ls \"\$GIT_DIR\"/svn/trunk/.rev_map.*)\" &&
 	test -n \"\$expect\" &&
+	rev_db=\"\$(echo \$expect | sed -e 's,_map,_db,')\" &&
+	convert_to_rev_db \"\$expect\" \"\$rev_db\" &&
+	rm -f \"\$expect\" &&
+	test -f \"\$rev_db\" &&
 	git-svn fetch -i trunk &&
+	test -z \"\$(ls \"\$GIT_DIR\"/svn/trunk/.rev_db.* 2>/dev/null)\" &&
+	test ! -e \"\$GIT_DIR\"/svn/trunk/.rev_db &&
+	test -f \"\$expect\"
 	"
While looking at this test: Wouldn't it be easier to just place the whole
thing (and probably similar cases, too) in single-quotes?
To be honest, I fixed all the git-svn tests with a suitably clever vim s///
expression, so at the time this way was actually easier :)
Yeah, last night I ran out of energy reviewing things.  The above is
simply too ugly to be acceptable, with or without automated s///
expression.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help