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.)
This commit is contained in:
Martin Geisler 2011-03-01 17:01:17 +01:00
parent 9b2d3c510c
commit 83c27fb95f
16 changed files with 16 additions and 15 deletions

View File

@ -66,6 +66,7 @@ testpats = [
(r'^source\b', "don't use 'source', use '.'"), (r'^source\b', "don't use 'source', use '.'"),
(r'touch -d', "don't use 'touch -d', use 'touch -t' instead"), (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"),
(r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"), (r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"),
(r'cat > \$HGRCPATH <<EOF', "append to $HGRCPATH, do not overwrite it"),
] ]
testfilters = [ testfilters = [

View File

@ -1,5 +1,5 @@
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [extensions] > [extensions]
> graphlog = > graphlog =
> convert = > convert =

View File

@ -1,7 +1,7 @@
$ "$TESTDIR/hghave" svn svn-bindings || exit 80 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [extensions] > [extensions]
> convert = > convert =
> graphlog = > graphlog =

View File

@ -1,7 +1,7 @@
$ "$TESTDIR/hghave" svn svn-bindings || exit 80 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [extensions] > [extensions]
> convert = > convert =
> graphlog = > graphlog =

View File

@ -5,7 +5,7 @@
> { > {
> tr '\\' / > tr '\\' /
> } > }
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [extensions] > [extensions]
> convert = > convert =
> graphlog = > graphlog =

View File

@ -22,7 +22,7 @@
> ) > )
> } > }
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [extensions] > [extensions]
> convert = > convert =
> graphlog = > graphlog =

View File

@ -5,7 +5,7 @@
> { > {
> tr '\\' / > tr '\\' /
> } > }
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [extensions] > [extensions]
> convert = > convert =
> graphlog = > graphlog =

View File

@ -1,7 +1,7 @@
$ "$TESTDIR/hghave" svn svn-bindings || exit 80 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [extensions] > [extensions]
> convert = > convert =
> graphlog = > graphlog =

View File

@ -1,7 +1,7 @@
$ "$TESTDIR/hghave" svn svn-bindings || exit 80 $ "$TESTDIR/hghave" svn svn-bindings || exit 80
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [extensions] > [extensions]
> convert = > convert =
> graphlog = > graphlog =

View File

@ -1,6 +1,6 @@
Test adding .hgeol Test adding .hgeol
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [diff] > [diff]
> git = 1 > git = 1
> EOF > EOF

View File

@ -1,6 +1,6 @@
Testing cloning with the EOL extension Testing cloning with the EOL extension
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [diff] > [diff]
> git = True > git = True
> >

View File

@ -1,6 +1,6 @@
Test the EOL hook Test the EOL hook
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [diff] > [diff]
> git = True > git = True
> EOF > EOF

View File

@ -1,6 +1,6 @@
Test EOL patching Test EOL patching
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [diff] > [diff]
> git = 1 > git = 1
> EOF > EOF

View File

@ -2,7 +2,7 @@ http://mercurial.selenic.com/bts/issue2493
Testing tagging with the EOL extension Testing tagging with the EOL extension
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [diff] > [diff]
> git = True > git = True
> >

View File

@ -1,6 +1,6 @@
Test EOL update Test EOL update
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [diff] > [diff]
> git = 1 > git = 1
> EOF > EOF

View File

@ -1,6 +1,6 @@
Test EOL extension Test EOL extension
$ cat > $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [diff] > [diff]
> git = True > git = True
> EOF > EOF