git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] t1507: change quoting in test_did_you_mean to a more general one
@ 2011-05-05 19:10 Kacper Kornet
  2011-05-05 20:02 ` Junio C Hamano
  0 siblings, 1 reply; 12+ messages in thread
From: Kacper Kornet @ 2011-05-05 19:10 UTC (permalink / raw)
  To: git

In bash and some other shells the script:

x=2; unset a; echo "${a:-'$x'}"

prints '2'. However ksh shell prints $x. The quoting is added to
reproduce bash behaviour.

Signed-off-by: Kacper Kornet <draenog@pld-linux.org>
---
 t/t1506-rev-parse-diagnosis.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/t/t1506-rev-parse-diagnosis.sh b/t/t1506-rev-parse-diagnosis.sh
index 4a6396f..bad09f9 100755
--- a/t/t1506-rev-parse-diagnosis.sh
+++ b/t/t1506-rev-parse-diagnosis.sh
@@ -8,8 +8,8 @@ exec </dev/null
 
 test_did_you_mean ()
 {
-	printf "fatal: Path '$2$3' $4, but not ${5:-'$3'}.\n" >expected &&
-	printf "Did you mean '$1:$2$3'${2:+ aka '$1:./$3'}?\n" >>expected &&
+	printf "fatal: Path '$2$3' $4, but not ${5:-\'$3\'}.\n" >expected &&
+	printf "Did you mean '$1:$2$3'${2:+ aka \'$1:./$3\'}?\n" >>expected &&
 	test_cmp expected error
 }
 
-- 
1.7.5

-- 
  Kacper Kornet

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-05-09 16:20 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-05 19:10 [PATCH] t1507: change quoting in test_did_you_mean to a more general one Kacper Kornet
2011-05-05 20:02 ` Junio C Hamano
2011-05-06  7:43   ` Michael J Gruber
2011-05-06  8:51     ` Kacper Kornet
2011-05-06  9:14       ` Michael J Gruber
2011-05-06 10:22     ` Johannes Sixt
2011-05-06 11:10       ` Michael J Gruber
2011-05-06 14:23       ` Junio C Hamano
2011-05-09  4:40       ` Junio C Hamano
2011-05-09  6:39         ` Johannes Sixt
2011-05-09 16:20           ` Junio C Hamano
2011-05-06  8:39   ` Kacper Kornet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).