diff tests/test-convert-tagsbranch-topology.t @ 23172:e955549cd045

tests: write hgrc of more than two lines by using shell heredoc Here document should be readable than repeating echo commands.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 04 Nov 2014 23:41:46 +0900
parents 7a9cbb315d84
children 86fe3c404c1e
line wrap: on
line diff
--- a/tests/test-convert-tagsbranch-topology.t	Tue Nov 04 10:40:06 2014 +0000
+++ b/tests/test-convert-tagsbranch-topology.t	Tue Nov 04 23:41:46 2014 +0900
@@ -4,11 +4,13 @@
   $ echo "autocrlf = false" >> $HOME/.gitconfig
   $ echo "[core]" >> $HOME/.gitconfig
   $ echo "autocrlf = false" >> $HOME/.gitconfig
-  $ echo "[extensions]" >> $HGRCPATH
-  $ echo "convert=" >> $HGRCPATH
-  $ echo '[convert]' >> $HGRCPATH
-  $ echo 'hg.usebranchnames = True' >> $HGRCPATH
-  $ echo 'hg.tagsbranch = tags-update' >> $HGRCPATH
+  $ cat <<EOF >> $HGRCPATH
+  > [extensions]
+  > convert =
+  > [convert]
+  > hg.usebranchnames = True
+  > hg.tagsbranch = tags-update
+  > EOF
   $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME
   $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL
   $ GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0000"; export GIT_AUTHOR_DATE