diff tests/test-bad-extension.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 005a540e9aee
children de23a552fc23
line wrap: on
line diff
--- a/tests/test-bad-extension.t	Tue Nov 04 10:40:06 2014 +0000
+++ b/tests/test-bad-extension.t	Tue Nov 04 23:41:46 2014 +0900
@@ -1,11 +1,13 @@
   $ echo 'raise Exception("bit bucket overflow")' > badext.py
   $ abspath=`pwd`/badext.py
 
-  $ echo '[extensions]' >> $HGRCPATH
-  $ echo "gpg =" >> $HGRCPATH
-  $ echo "hgext.gpg =" >> $HGRCPATH
-  $ echo "badext = $abspath" >> $HGRCPATH
-  $ echo "badext2 =" >> $HGRCPATH
+  $ cat <<EOF >> $HGRCPATH
+  > [extensions]
+  > gpg =
+  > hgext.gpg =
+  > badext = $abspath
+  > badext2 =
+  > EOF
 
   $ hg -q help help
   *** failed to import extension badext from $TESTTMP/badext.py: bit bucket overflow