tests: introduce "checkeditform-n-cat.sh" script to invoke "cat" in it safely stable
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Tue, 28 Oct 2014 00:19:18 +0900
branchstable
changeset 23092 501dc6b1ca78
parent 23091 8d43c6bb38c0
child 23093 a3fee83dba59
tests: introduce "checkeditform-n-cat.sh" script to invoke "cat" in it safely Before this patch, a part of "test-transplant.t" fails unexpectedly on Windows environment, because semicolon (";") in HGEDITOR isn't recognized as the command separator by "cmd.exe". This patch newly introduces "checkeditform-n-cat.sh" script to invoke "cat" in it safely anywhere.
tests/test-transplant.t
--- a/tests/test-transplant.t	Fri Oct 24 13:50:00 2014 -0400
+++ b/tests/test-transplant.t	Tue Oct 28 00:19:18 2014 +0900
@@ -99,7 +99,11 @@
   > env | grep HGEDITFORM
   > true
   > EOF
-  $ HGEDITOR="sh $TESTTMP/checkeditform.sh; cat" hg transplant --edit 7
+  $ cat > $TESTTMP/checkeditform-n-cat.sh <<EOF
+  > env | grep HGEDITFORM
+  > cat \$*
+  > EOF
+  $ HGEDITOR="sh $TESTTMP/checkeditform-n-cat.sh" hg transplant --edit 7
   applying ffd6818a3975
   HGEDITFORM=transplant.normal
   b3