Skip to contentSkip to conversation

Fix quoting of redirect in test script

PATCH In review Charles Bailey 2 participants 3 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix quoting of redirect in test script

From: Charles Bailey <[email protected]>

---
 t/t3404-rebase-interactive.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

If you are using bash (at least 4.3.30 or 4.3.42) this actually causes an error due to an "ambiguous redirect" because there is a space in "trash directory".

t/t3404-rebase-interactive.sh +1 -1
index 98eb49a..9067e02 100755
@@ -1234,7 +1234,7 @@ test_expect_success 'tabs and spaces are accepted in the todolist' '
 		# Turn single spaces into space/tab mix
 		sed "1s/ /	/g; 2s/ /  /g; 3s/ / 	/g" "$1"
 		printf "\n\t# comment\n #more\n\t # comment\n"
-	) >$1.new
+	) >"$1.new"
 	mv "$1.new" "$1"
 	EOF
 	test_set_editor "$(pwd)/add-indent.sh" &&
Signature · 1 line
2.4.0.53.g8440f74