# HG changeset patch # User Sean Farley # Date 1396035207 18000 # Node ID e259d4c462b563ebcec7751a2e8291313e99bd59 # Parent bc56ec9e64df9f633fe7977f63ef2e337b1ea8ae tests: use TESTTMP instead of TESTDIR In 57d0c8c3b947, f042d4b263f4, 1e686e55780c, and 5d22cadd1938, new tests were added that used TESTDIR instead of TESTTMP thereby leading to polluting the working directory with these temporary files. Now, we use TESTTMP so that they will be cleaned up properly. diff -r bc56ec9e64df -r e259d4c462b5 tests/test-commit.t --- a/tests/test-commit.t Sat Mar 29 01:20:07 2014 +0900 +++ b/tests/test-commit.t Fri Mar 28 14:33:27 2014 -0500 @@ -298,7 +298,7 @@ $ echo 'sub = sub' > .hgsub $ hg add .hgsub - $ cat > $TESTDIR/editor.sh < $TESTTMP/editor.sh < echo "==== before editing:" > cat \$1 > echo "====" @@ -306,7 +306,7 @@ > EOF $ rm -f .hg/last-message.txt - $ HGEDITOR="sh $TESTDIR/editor.sh" hg commit -S -q + $ HGEDITOR="sh $TESTTMP/editor.sh" hg commit -S -q ==== before editing: diff -r bc56ec9e64df -r e259d4c462b5 tests/test-histedit-fold.t --- a/tests/test-histedit-fold.t Sat Mar 29 01:20:07 2014 +0900 +++ b/tests/test-histedit-fold.t Fri Mar 28 14:33:27 2014 -0500 @@ -107,7 +107,7 @@ check saving last-message.txt - $ cat > $TESTDIR/abortfolding.py < $TESTTMP/abortfolding.py < from mercurial import util > def abortfolding(ui, repo, hooktype, **kwargs): > ctx = repo[kwargs.get('node')] @@ -117,10 +117,10 @@ > EOF $ cat > .hg/hgrc < [hooks] - > pretxncommit.abortfolding = python:$TESTDIR/abortfolding.py:abortfolding + > pretxncommit.abortfolding = python:$TESTTMP/abortfolding.py:abortfolding > EOF - $ cat > $TESTDIR/editor.sh << EOF + $ cat > $TESTTMP/editor.sh << EOF > echo "==== before editing" > cat \$1 > echo "====" @@ -128,7 +128,7 @@ > EOF $ rm -f .hg/last-message.txt - $ HGEDITOR="sh $TESTDIR/editor.sh" hg histedit 6de59d13424a --commands - 2>&1 <&1 < pick 6de59d13424a f > fold 9c277da72c9b d > EOF diff -r bc56ec9e64df -r e259d4c462b5 tests/test-mq-qfold.t --- a/tests/test-mq-qfold.t Sat Mar 29 01:20:07 2014 +0900 +++ b/tests/test-mq-qfold.t Fri Mar 28 14:33:27 2014 -0500 @@ -144,7 +144,7 @@ $ hg qrefresh -m "original message" - $ cat > $TESTDIR/commitfailure.py < $TESTTMP/commitfailure.py < from mercurial import util > def reposetup(ui, repo): > class commitfailure(repo.__class__): @@ -155,10 +155,10 @@ $ cat > .hg/hgrc < [extensions] - > commitfailure = $TESTDIR/commitfailure.py + > commitfailure = $TESTTMP/commitfailure.py > EOF - $ cat > $TESTDIR/editor.sh << EOF + $ cat > $TESTTMP/editor.sh << EOF > echo "==== before editing" > cat \$1 > echo "====" @@ -166,7 +166,7 @@ > EOF $ rm -f .hg/last-message.txt - $ HGEDITOR="sh $TESTDIR/editor.sh" hg qfold -e p3 + $ HGEDITOR="sh $TESTTMP/editor.sh" hg qfold -e p3 ==== before editing original message==== refresh interrupted while patch was popped! (revert --all, qpush to recover) diff -r bc56ec9e64df -r e259d4c462b5 tests/test-mq-qnew.t --- a/tests/test-mq-qnew.t Sat Mar 29 01:20:07 2014 +0900 +++ b/tests/test-mq-qnew.t Fri Mar 28 14:33:27 2014 -0500 @@ -239,7 +239,7 @@ $ hg init repo $ cd repo - $ cat > $TESTDIR/commitfailure.py < $TESTTMP/commitfailure.py < from mercurial import util > def reposetup(ui, repo): > class commitfailure(repo.__class__): @@ -249,10 +249,10 @@ > EOF $ cat > .hg/hgrc < [extensions] - > commitfailure = $TESTDIR/commitfailure.py + > commitfailure = $TESTTMP/commitfailure.py > EOF - $ cat > $TESTDIR/editor.sh << EOF + $ cat > $TESTTMP/editor.sh << EOF > echo "==== before editing" > cat \$1 > echo "====" @@ -260,7 +260,7 @@ > EOF $ rm -f .hg/last-message.txt - $ HGEDITOR="sh $TESTDIR/editor.sh" hg qnew -e patch + $ HGEDITOR="sh $TESTTMP/editor.sh" hg qnew -e patch ==== before editing ==== abort: emulating unexpected abort