Mercurial > hg-stable
changeset 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 | 8afae1d5d108 |
children | 122f5c3f3308 |
files | tests/test-abort-checkin.t tests/test-bad-extension.t tests/test-branches.t tests/test-config.t tests/test-convert-clonebranches.t tests/test-convert-cvs-branch.t tests/test-convert-cvs-detectmerge.t tests/test-convert-cvs.t tests/test-convert-hg-svn.t tests/test-convert-tagsbranch-topology.t tests/test-diff-color.t tests/test-diff-upgrade.t tests/test-eol.t tests/test-eolfilename.t tests/test-export.t tests/test-extdiff.t tests/test-extension.t tests/test-mq-eol.t tests/test-mq-git.t tests/test-mq-header-date.t tests/test-mq-merge.t tests/test-mq-qdiff.t tests/test-mq-qfold.t tests/test-mq-qimport.t tests/test-mq-qrefresh.t tests/test-mq-subrepo-svn.t tests/test-mq-subrepo.t tests/test-mq.t tests/test-record.t tests/test-shelve.t tests/test-status-color.t |
diffstat | 31 files changed, 226 insertions(+), 155 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-abort-checkin.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-abort-checkin.t Tue Nov 04 23:41:46 2014 +0900 @@ -7,9 +7,11 @@ > EOF $ abspath=`pwd`/abortcommit.py - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "abortcommit = $abspath" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > abortcommit = $abspath + > EOF $ hg init foo $ cd foo
--- 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
--- a/tests/test-branches.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-branches.t Tue Nov 04 23:41:46 2014 +0900 @@ -419,10 +419,12 @@ default branch colors: - $ echo "[extensions]" >> $HGRCPATH - $ echo "color =" >> $HGRCPATH - $ echo "[color]" >> $HGRCPATH - $ echo "mode = ansi" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > color = + > [color] + > mode = ansi + > EOF $ hg up -C c 3 files updated, 0 files merged, 2 files removed, 0 files unresolved @@ -444,14 +446,16 @@ \x1b[0;0ma\x1b[0m\x1b[0;33m 5:d8cbc61dbaa6\x1b[0m (inactive) (esc) \x1b[0;0mdefault\x1b[0m\x1b[0;33m 0:19709c5a4e75\x1b[0m (inactive) (esc) - $ echo "[extensions]" >> $HGRCPATH - $ echo "color =" >> $HGRCPATH - $ echo "[color]" >> $HGRCPATH - $ echo "branches.active = green" >> $HGRCPATH - $ echo "branches.closed = blue" >> $HGRCPATH - $ echo "branches.current = red" >> $HGRCPATH - $ echo "branches.inactive = magenta" >> $HGRCPATH - $ echo "log.changeset = cyan" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > color = + > [color] + > branches.active = green + > branches.closed = blue + > branches.current = red + > branches.inactive = magenta + > log.changeset = cyan + > EOF custom branch colors:
--- a/tests/test-config.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-config.t Tue Nov 04 23:41:46 2014 +0900 @@ -44,9 +44,11 @@ Test case sensitive configuration - $ echo '[Section]' >> $HGRCPATH - $ echo 'KeY = Case Sensitive' >> $HGRCPATH - $ echo 'key = lower case' >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [Section] + > KeY = Case Sensitive + > key = lower case + > EOF $ hg showconfig Section Section.KeY=Case Sensitive
--- a/tests/test-convert-clonebranches.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-convert-clonebranches.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,8 +1,10 @@ - $ echo "[extensions]" >> $HGRCPATH - $ echo "convert = " >> $HGRCPATH - $ echo "[convert]" >> $HGRCPATH - $ echo "hg.tagsbranch=0" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > convert = + > [convert] + > hg.tagsbranch = 0 + > EOF $ hg init source $ cd source $ echo a > a
--- a/tests/test-convert-cvs-branch.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-convert-cvs-branch.t Tue Nov 04 23:41:46 2014 +0900 @@ -7,10 +7,12 @@ > { > cvs -f "$@" > /dev/null > } - $ echo "[extensions]" >> $HGRCPATH - $ echo "convert = " >> $HGRCPATH - $ echo "[convert]" >> $HGRCPATH - $ echo "cvsps.cache=0" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > convert = + > [convert] + > cvsps.cache = 0 + > EOF create cvs repository
--- a/tests/test-convert-cvs-detectmerge.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-convert-cvs-detectmerge.t Tue Nov 04 23:41:46 2014 +0900 @@ -23,11 +23,13 @@ XXX copied from test-convert-cvs-synthetic - $ echo "[extensions]" >> $HGRCPATH - $ echo "convert = " >> $HGRCPATH - $ echo "[convert]" >> $HGRCPATH - $ echo "cvsps.cache=0" >> $HGRCPATH - $ echo "cvsps.mergefrom=\[MERGE from (\S+)\]" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > convert = + > [convert] + > cvsps.cache = 0 + > cvsps.mergefrom = \[MERGE from (\S+)\] + > EOF create cvs repository with one project
--- a/tests/test-convert-cvs.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-convert-cvs.t Tue Nov 04 23:41:46 2014 +0900 @@ -18,9 +18,11 @@ > print "%s hook: %d changesets"%(hooktype,len(changesets)) > EOF $ hookpath=`pwd` - $ echo "[hooks]" >> $HGRCPATH - $ echo "cvslog=python:$hookpath/cvshooks.py:cvslog" >> $HGRCPATH - $ echo "cvschangesets=python:$hookpath/cvshooks.py:cvschangesets" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [hooks] + > cvslog = python:$hookpath/cvshooks.py:cvslog + > cvschangesets = python:$hookpath/cvshooks.py:cvschangesets + > EOF create cvs repository
--- a/tests/test-convert-hg-svn.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-convert-hg-svn.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,8 +1,10 @@ #require svn svn-bindings - $ echo "[extensions]" >> $HGRCPATH - $ echo "convert = " >> $HGRCPATH - $ echo "mq = " >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > convert = + > mq = + > EOF $ SVNREPOPATH=`pwd`/svn-repo #if windows
--- 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
--- a/tests/test-diff-color.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-diff-color.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,9 +1,11 @@ Setup - $ echo "[color]" >> $HGRCPATH - $ echo "mode = ansi" >> $HGRCPATH - $ echo "[extensions]" >> $HGRCPATH - $ echo "color=" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [color] + > mode = ansi + > [extensions] + > color = + > EOF $ hg init repo $ cd repo $ cat > a <<EOF @@ -66,11 +68,13 @@ $ hg diff --stat --color=always a | 2 \x1b[0;32m+\x1b[0m\x1b[0;31m-\x1b[0m (esc) 1 files changed, 1 insertions(+), 1 deletions(-) - $ echo "record=" >> $HGRCPATH - $ echo "[ui]" >> $HGRCPATH - $ echo "interactive=true" >> $HGRCPATH - $ echo "[diff]" >> $HGRCPATH - $ echo "git=True" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > record = + > [ui] + > interactive = true + > [diff] + > git = True + > EOF #if execbit
--- a/tests/test-diff-upgrade.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-diff-upgrade.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,9 +1,11 @@ #require execbit - $ echo "[extensions]" >> $HGRCPATH - $ echo "autodiff=$TESTDIR/autodiff.py" >> $HGRCPATH - $ echo "[diff]" >> $HGRCPATH - $ echo "nodates=1" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > autodiff = $TESTDIR/autodiff.py + > [diff] + > nodates = 1 + > EOF $ hg init repo $ cd repo
--- a/tests/test-eol.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-eol.t Tue Nov 04 23:41:46 2014 +0900 @@ -408,10 +408,12 @@ Test cleverencode: and cleverdecode: aliases for win32text extension - $ echo '[encode]' >> $HGRCPATH - $ echo '**.txt = cleverencode:' >> $HGRCPATH - $ echo '[decode]' >> $HGRCPATH - $ echo '**.txt = cleverdecode:' >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [encode] + > **.txt = cleverencode: + > [decode] + > **.txt = cleverdecode: + > EOF $ hg init win32compat $ cd win32compat
--- a/tests/test-eolfilename.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-eolfilename.t Tue Nov 04 23:41:46 2014 +0900 @@ -59,10 +59,12 @@ $ hg init bar $ cd bar - $ echo "[extensions]" >> $HGRCPATH - $ echo "color=" >> $HGRCPATH - $ echo "[color]" >> $HGRCPATH - $ echo "mode = ansi" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > color = + > [color] + > mode = ansi + > EOF $ A=`printf 'foo\nbar'` $ B=`printf 'foo\nbar.baz'` $ touch "$A"
--- a/tests/test-export.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-export.t Tue Nov 04 23:41:46 2014 +0900 @@ -176,10 +176,12 @@ [255] Check for color output - $ echo "[color]" >> $HGRCPATH - $ echo "mode = ansi" >> $HGRCPATH - $ echo "[extensions]" >> $HGRCPATH - $ echo "color=" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [color] + > mode = ansi + > [extensions] + > color = + > EOF $ hg export --color always --nodates tip # HG changeset patch
--- a/tests/test-extdiff.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-extdiff.t Tue Nov 04 23:41:46 2014 +0900 @@ -16,11 +16,13 @@ Only in a: b [1] - $ echo "[extdiff]" >> $HGRCPATH - $ echo "cmd.falabala=echo" >> $HGRCPATH - $ echo "opts.falabala=diffing" >> $HGRCPATH - $ echo "cmd.edspace=echo" >> $HGRCPATH - $ echo 'opts.edspace="name <user@example.com>"' >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extdiff] + > cmd.falabala = echo + > opts.falabala = diffing + > cmd.edspace = echo + > opts.edspace = "name <user@example.com>" + > EOF $ hg falabala diffing a.000000000000 a
--- a/tests/test-extension.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-extension.t Tue Nov 04 23:41:46 2014 +0900 @@ -557,11 +557,13 @@ > "yet another debug command" > ui.write("%s\n" % '\n'.join([x for x, y in extensions.extensions()])) > EOF - $ echo "debugissue811 = $debugpath" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "strip=" >> $HGRCPATH - $ echo "hgext.mq=" >> $HGRCPATH - $ echo "hgext/mq=" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > debugissue811 = $debugpath + > mq = + > strip = + > hgext.mq = + > hgext/mq = + > EOF Show extensions: (note that mq force load strip, also checking it's not loaded twice) @@ -812,9 +814,11 @@ $ hg -q -R pull-src1 pull src reposetup() for $TESTTMP/reposetup-test/src (glob) - $ echo '[extensions]' >> $HGRCPATH - $ echo '# disable extension globally and explicitly' >> $HGRCPATH - $ echo 'reposetuptest = !' >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > # disable extension globally and explicitly + > reposetuptest = ! + > EOF $ hg clone -U src clone-dst2 reposetup() for $TESTTMP/reposetup-test/src (glob) $ hg init push-dst2 @@ -824,9 +828,11 @@ $ hg -q -R pull-src2 pull src reposetup() for $TESTTMP/reposetup-test/src (glob) - $ echo '[extensions]' >> $HGRCPATH - $ echo '# enable extension globally' >> $HGRCPATH - $ echo "reposetuptest = $TESTTMP/reposetuptest.py" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > # enable extension globally + > reposetuptest = $TESTTMP/reposetuptest.py + > EOF $ hg clone -U src clone-dst3 reposetup() for $TESTTMP/reposetup-test/src (glob) reposetup() for $TESTTMP/reposetup-test/clone-dst3 (glob) @@ -862,9 +868,11 @@ $ hg --config extensions.reposetuptest=! init pull-src5 $ hg --config extensions.reposetuptest=! -q -R pull-src5 pull src - $ echo '[extensions]' >> $HGRCPATH - $ echo '# disable extension globally and explicitly' >> $HGRCPATH - $ echo 'reposetuptest = !' >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > # disable extension globally and explicitly + > reposetuptest = ! + > EOF $ hg init parent $ hg init parent/sub1 $ echo 1 > parent/sub1/1
--- a/tests/test-mq-eol.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq-eol.t Tue Nov 04 23:41:46 2014 +0900 @@ -2,10 +2,12 @@ Test interactions between mq and patch.eol - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "[diff]" >> $HGRCPATH - $ echo "nodates=1" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > [diff] + > nodates = 1 + > EOF $ cat > makepatch.py <<EOF > f = file('eol.diff', 'wb')
--- a/tests/test-mq-git.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq-git.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,10 +1,12 @@ # Test the plumbing of mq.git option # Automatic upgrade itself is tested elsewhere. - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "[diff]" >> $HGRCPATH - $ echo "nodates=1" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > [diff] + > nodates = 1 + > EOF $ hg init repo-auto $ cd repo-auto
--- a/tests/test-mq-header-date.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq-header-date.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,8 +1,10 @@ - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "[diff]" >> $HGRCPATH - $ echo "nodates=true" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > [diff] + > nodates = true + > EOF $ catpatch() { > cat .hg/patches/$1.patch | sed -e "s/^diff \-r [0-9a-f]* /diff -r ... /" \ > -e "s/^\(# Parent \).*/\1/"
--- a/tests/test-mq-merge.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq-merge.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,9 +1,11 @@ Setup extension: - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq =" >> $HGRCPATH - $ echo "[mq]" >> $HGRCPATH - $ echo "git = keep" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > [mq] + > git = keep + > EOF Test merge with mq changeset as the second parent:
--- a/tests/test-mq-qdiff.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq-qdiff.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,7 +1,9 @@ - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "[mq]" >> $HGRCPATH - $ echo "git=keep" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > [mq] + > git = keep + > EOF $ hg init a $ cd a
--- a/tests/test-mq-qfold.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq-qfold.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,9 +1,11 @@ - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "[mq]" >> $HGRCPATH - $ echo "git=keep" >> $HGRCPATH - $ echo "[diff]" >> $HGRCPATH - $ echo "nodates=1" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > [mq] + > git = keep + > [diff] + > nodates = 1 + > EOF init:
--- a/tests/test-mq-qimport.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq-qimport.t Tue Nov 04 23:41:46 2014 +0900 @@ -15,10 +15,12 @@ > f.close() > > EOF - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "[diff]" >> $HGRCPATH - $ echo "git=1" >> $HGRCPATH + > cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > [diff] + > git = 1 + > EOF $ hg init repo $ cd repo
--- a/tests/test-mq-qrefresh.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq-qrefresh.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,7 +1,9 @@ - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "[diff]" >> $HGRCPATH - $ echo "nodates=1" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > [diff] + > nodates = 1 + > EOF $ hg init a $ cd a
--- a/tests/test-mq-subrepo-svn.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq-subrepo-svn.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,9 +1,11 @@ #require svn13 - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "[diff]" >> $HGRCPATH - $ echo "nodates=1" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > [diff] + > nodates = 1 + > EOF fn to create new repository, and cd into it $ mkrepo() {
--- a/tests/test-mq-subrepo.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq-subrepo.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,10 +1,12 @@ - $ echo "[ui]" >> $HGRCPATH - $ echo "commitsubrepos = Yes" >> $HGRCPATH - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "record=" >> $HGRCPATH - $ echo "[diff]" >> $HGRCPATH - $ echo "nodates=1" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [ui] + > commitsubrepos = Yes + > [extensions] + > mq = + > record = + > [diff] + > nodates = 1 + > EOF $ stdin=`pwd`/stdin.tmp
--- a/tests/test-mq.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-mq.t Tue Nov 04 23:41:46 2014 +0900 @@ -5,11 +5,12 @@ > fi > } - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - - $ echo "[mq]" >> $HGRCPATH - $ echo "plain=true" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > [mq] + > plain = true + > EOF help
--- a/tests/test-record.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-record.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,9 +1,11 @@ Set up a repo - $ echo "[ui]" >> $HGRCPATH - $ echo "interactive=true" >> $HGRCPATH - $ echo "[extensions]" >> $HGRCPATH - $ echo "record=" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [ui] + > interactive = true + > [extensions] + > record = + > EOF $ hg init a $ cd a
--- a/tests/test-shelve.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-shelve.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,9 +1,11 @@ - $ echo "[extensions]" >> $HGRCPATH - $ echo "mq=" >> $HGRCPATH - $ echo "shelve=" >> $HGRCPATH - $ echo "[defaults]" >> $HGRCPATH - $ echo "diff = --nodates --git" >> $HGRCPATH - $ echo "qnew = --date '0 0'" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > mq = + > shelve = + > [defaults] + > diff = --nodates --git + > qnew = --date '0 0' + > EOF $ hg init repo $ cd repo
--- a/tests/test-status-color.t Tue Nov 04 10:40:06 2014 +0000 +++ b/tests/test-status-color.t Tue Nov 04 23:41:46 2014 +0900 @@ -1,7 +1,9 @@ - $ echo "[extensions]" >> $HGRCPATH - $ echo "color=" >> $HGRCPATH - $ echo "[color]" >> $HGRCPATH - $ echo "mode=ansi" >> $HGRCPATH + $ cat <<EOF >> $HGRCPATH + > [extensions] + > color = + > [color] + > mode = ansi + > EOF Terminfo codes compatibility fix $ echo "color.none=0" >> $HGRCPATH