From 83c27fb95f767d191666eefa337dd0713b512871 Mon Sep 17 00:00:00 2001 From: Martin Geisler Date: Tue, 1 Mar 2011 17:01:17 +0100 Subject: [PATCH] tests: don't overwrite HGRCPATH Overwriting instead of appending to the file removes the [defaults] section put into the file by run-tests.py. It also defeats the --inotify option to run-tests.py. (Nothing was broken yet, but the lack of -d "0 0" cause changeset hashes to change unexpectedly in a test case I was editing.) --- contrib/check-code.py | 1 + tests/test-convert-hg-startrev.t | 2 +- tests/test-convert-svn-branches.t | 2 +- tests/test-convert-svn-encoding.t | 2 +- tests/test-convert-svn-move.t | 2 +- tests/test-convert-svn-sink.t | 2 +- tests/test-convert-svn-source.t | 2 +- tests/test-convert-svn-startrev.t | 2 +- tests/test-convert-svn-tags.t | 2 +- tests/test-eol-add.t | 2 +- tests/test-eol-clone.t | 2 +- tests/test-eol-hook.t | 2 +- tests/test-eol-patch.t | 2 +- tests/test-eol-tag.t | 2 +- tests/test-eol-update.t | 2 +- tests/test-eol.t | 2 +- 16 files changed, 16 insertions(+), 15 deletions(-) diff --git a/contrib/check-code.py b/contrib/check-code.py index 4bc484fe4a..7dbdbebd00 100755 --- a/contrib/check-code.py +++ b/contrib/check-code.py @@ -66,6 +66,7 @@ testpats = [ (r'^source\b', "don't use 'source', use '.'"), (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"), (r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"), + (r'cat > \$HGRCPATH < $HGRCPATH <> $HGRCPATH < [extensions] > graphlog = > convert = diff --git a/tests/test-convert-svn-branches.t b/tests/test-convert-svn-branches.t index caafc76295..b7967502b6 100644 --- a/tests/test-convert-svn-branches.t +++ b/tests/test-convert-svn-branches.t @@ -1,7 +1,7 @@ $ "$TESTDIR/hghave" svn svn-bindings || exit 80 - $ cat > $HGRCPATH <> $HGRCPATH < [extensions] > convert = > graphlog = diff --git a/tests/test-convert-svn-encoding.t b/tests/test-convert-svn-encoding.t index 18a7a18709..1fbdea967e 100644 --- a/tests/test-convert-svn-encoding.t +++ b/tests/test-convert-svn-encoding.t @@ -1,7 +1,7 @@ $ "$TESTDIR/hghave" svn svn-bindings || exit 80 - $ cat > $HGRCPATH <> $HGRCPATH < [extensions] > convert = > graphlog = diff --git a/tests/test-convert-svn-move.t b/tests/test-convert-svn-move.t index d3e74f3807..174578d79f 100644 --- a/tests/test-convert-svn-move.t +++ b/tests/test-convert-svn-move.t @@ -5,7 +5,7 @@ > { > tr '\\' / > } - $ cat > $HGRCPATH <> $HGRCPATH < [extensions] > convert = > graphlog = diff --git a/tests/test-convert-svn-sink.t b/tests/test-convert-svn-sink.t index ff62d1b19e..32e95edbd0 100644 --- a/tests/test-convert-svn-sink.t +++ b/tests/test-convert-svn-sink.t @@ -22,7 +22,7 @@ > ) > } - $ cat > $HGRCPATH <> $HGRCPATH < [extensions] > convert = > graphlog = diff --git a/tests/test-convert-svn-source.t b/tests/test-convert-svn-source.t index 5cc3357c40..ce7a1cfcd0 100644 --- a/tests/test-convert-svn-source.t +++ b/tests/test-convert-svn-source.t @@ -5,7 +5,7 @@ > { > tr '\\' / > } - $ cat > $HGRCPATH <> $HGRCPATH < [extensions] > convert = > graphlog = diff --git a/tests/test-convert-svn-startrev.t b/tests/test-convert-svn-startrev.t index dae21f6a38..3ce1f55107 100644 --- a/tests/test-convert-svn-startrev.t +++ b/tests/test-convert-svn-startrev.t @@ -1,7 +1,7 @@ $ "$TESTDIR/hghave" svn svn-bindings || exit 80 - $ cat > $HGRCPATH <> $HGRCPATH < [extensions] > convert = > graphlog = diff --git a/tests/test-convert-svn-tags.t b/tests/test-convert-svn-tags.t index bbcbc5c8b5..2f93e0e2fa 100644 --- a/tests/test-convert-svn-tags.t +++ b/tests/test-convert-svn-tags.t @@ -1,7 +1,7 @@ $ "$TESTDIR/hghave" svn svn-bindings || exit 80 - $ cat > $HGRCPATH <> $HGRCPATH < [extensions] > convert = > graphlog = diff --git a/tests/test-eol-add.t b/tests/test-eol-add.t index 466c3d48da..aa06fede18 100644 --- a/tests/test-eol-add.t +++ b/tests/test-eol-add.t @@ -1,6 +1,6 @@ Test adding .hgeol - $ cat > $HGRCPATH <> $HGRCPATH < [diff] > git = 1 > EOF diff --git a/tests/test-eol-clone.t b/tests/test-eol-clone.t index 2e39397429..00934480ac 100644 --- a/tests/test-eol-clone.t +++ b/tests/test-eol-clone.t @@ -1,6 +1,6 @@ Testing cloning with the EOL extension - $ cat > $HGRCPATH <> $HGRCPATH < [diff] > git = True > diff --git a/tests/test-eol-hook.t b/tests/test-eol-hook.t index 93251dfbf2..0b8378053e 100644 --- a/tests/test-eol-hook.t +++ b/tests/test-eol-hook.t @@ -1,6 +1,6 @@ Test the EOL hook - $ cat > $HGRCPATH <> $HGRCPATH < [diff] > git = True > EOF diff --git a/tests/test-eol-patch.t b/tests/test-eol-patch.t index d7dd80ff2a..e2786f87c7 100644 --- a/tests/test-eol-patch.t +++ b/tests/test-eol-patch.t @@ -1,6 +1,6 @@ Test EOL patching - $ cat > $HGRCPATH <> $HGRCPATH < [diff] > git = 1 > EOF diff --git a/tests/test-eol-tag.t b/tests/test-eol-tag.t index a55824529f..0e36793974 100644 --- a/tests/test-eol-tag.t +++ b/tests/test-eol-tag.t @@ -2,7 +2,7 @@ http://mercurial.selenic.com/bts/issue2493 Testing tagging with the EOL extension - $ cat > $HGRCPATH <> $HGRCPATH < [diff] > git = True > diff --git a/tests/test-eol-update.t b/tests/test-eol-update.t index 316fb37f69..2189cfa261 100644 --- a/tests/test-eol-update.t +++ b/tests/test-eol-update.t @@ -1,6 +1,6 @@ Test EOL update - $ cat > $HGRCPATH <> $HGRCPATH < [diff] > git = 1 > EOF diff --git a/tests/test-eol.t b/tests/test-eol.t index 7bfa85d17e..0f4098e73f 100644 --- a/tests/test-eol.t +++ b/tests/test-eol.t @@ -1,6 +1,6 @@ Test EOL extension - $ cat > $HGRCPATH <> $HGRCPATH < [diff] > git = True > EOF