test-treediscovery: fix escaping for both dash and bash
A '\n' on the command line is turned into a newline by dash, but kept
as-is by bash, which resulted in a syntax error in the config file.
Luckily, dash wont turn '\n' into a newline when it is part of a
here-doc, so we can write the config file using that technique.
--- a/tests/test-treediscovery.t Thu May 05 12:53:33 2011 +0200
+++ b/tests/test-treediscovery.t Thu May 05 19:29:02 2011 +0200
@@ -2,10 +2,12 @@
$ CAP=getbundle
$ . "$TESTDIR/notcapable"
- $ echo '[ui]' >>$HGRCPATH
- $ echo 'logtemplate="{rev} {node|short}: {desc} {branches}\\n"' >>$HGRCPATH
- $ echo '[extensions]' >>$HGRCPATH
- $ echo 'graphlog=' >>$HGRCPATH
+ $ cat >> $HGRCPATH <<EOF
+ > [ui]
+ > logtemplate="{rev} {node|short}: {desc} {branches}\n"
+ > [extensions]
+ > graphlog=
+ > EOF
Setup HTTP server control: