[PATCH 2 of 2] tests: no need to explicitly export HOME in test files

Idan Kamara idankk86 at gmail.com
Fri Mar 25 15:39:31 CDT 2011


# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1301084285 -7200
# Node ID afe167d8ed21df78609b336e13b897e55ada5d19
# Parent  ab1678274c27f1a84c4b47cb2f53404a0d00e0bf
tests: no need to explicitly export HOME in test files

the test runner ensures that HOME is set to a temp dir

diff -r ab1678274c27 -r afe167d8ed21 tests/test-convert-baz
--- a/tests/test-convert-baz	Fri Mar 25 22:15:37 2011 +0200
+++ b/tests/test-convert-baz	Fri Mar 25 22:18:05 2011 +0200
@@ -2,10 +2,6 @@
 
 "$TESTDIR/hghave" baz || exit 80
 
-mkdir do_not_use_HOME_baz
-cd do_not_use_HOME_baz
-HOME=`pwd`; export HOME
-cd ..
 baz my-id "mercurial <mercurial at selenic.com>"
 
 echo "[extensions]" >> $HGRCPATH
diff -r ab1678274c27 -r afe167d8ed21 tests/test-convert-darcs.t
--- a/tests/test-convert-darcs.t	Fri Mar 25 22:15:37 2011 +0200
+++ b/tests/test-convert-darcs.t	Fri Mar 25 22:18:05 2011 +0200
@@ -4,7 +4,6 @@
   $ echo "convert=" >> $HGRCPATH
   $ echo 'graphlog =' >> $HGRCPATH
   $ DARCS_EMAIL='test at example.org'; export DARCS_EMAIL
-  $ HOME=`pwd`/do_not_use_HOME_darcs; export HOME
 
 skip if we can't import elementtree
 
diff -r ab1678274c27 -r afe167d8ed21 tests/test-convert-mtn.t
--- a/tests/test-convert-mtn.t	Fri Mar 25 22:15:37 2011 +0200
+++ b/tests/test-convert-mtn.t	Fri Mar 25 22:18:05 2011 +0200
@@ -8,7 +8,6 @@
   $ echo "[extensions]" >> $HGRCPATH
   $ echo "convert=" >> $HGRCPATH
   $ echo 'graphlog =' >> $HGRCPATH
-  $ HOME=`pwd`/do_not_use_HOME_mtn; export HOME
 
 Windows version of monotone home
 
diff -r ab1678274c27 -r afe167d8ed21 tests/test-convert-tla.t
--- a/tests/test-convert-tla.t	Fri Mar 25 22:15:37 2011 +0200
+++ b/tests/test-convert-tla.t	Fri Mar 25 22:18:05 2011 +0200
@@ -1,9 +1,5 @@
 
   $ "$TESTDIR/hghave" tla || exit 80
-  $ mkdir do_not_use_HOME_tla
-  $ cd do_not_use_HOME_tla
-  $ HOME=`pwd`; export HOME
-  $ cd ..
   $ tla my-id "mercurial <mercurial at selenic.com>"
   $ echo "[extensions]" >> $HGRCPATH
   $ echo "convert=" >> $HGRCPATH


More information about the Mercurial-devel mailing list