comparison tests/test-commit.t @ 20859:e259d4c462b5 stable

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.
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 28 Mar 2014 14:33:27 -0500
parents f042d4b263f4
children 81d6dc8c3c63
comparison
equal deleted inserted replaced
20858:bc56ec9e64df 20859:e259d4c462b5
296 > EOF 296 > EOF
297 297
298 $ echo 'sub = sub' > .hgsub 298 $ echo 'sub = sub' > .hgsub
299 $ hg add .hgsub 299 $ hg add .hgsub
300 300
301 $ cat > $TESTDIR/editor.sh <<EOF 301 $ cat > $TESTTMP/editor.sh <<EOF
302 > echo "==== before editing:" 302 > echo "==== before editing:"
303 > cat \$1 303 > cat \$1
304 > echo "====" 304 > echo "===="
305 > echo "test saving last-message.txt" >> \$1 305 > echo "test saving last-message.txt" >> \$1
306 > EOF 306 > EOF
307 307
308 $ rm -f .hg/last-message.txt 308 $ rm -f .hg/last-message.txt
309 $ HGEDITOR="sh $TESTDIR/editor.sh" hg commit -S -q 309 $ HGEDITOR="sh $TESTTMP/editor.sh" hg commit -S -q
310 ==== before editing: 310 ==== before editing:
311 311
312 312
313 HG: Enter commit message. Lines beginning with 'HG:' are removed. 313 HG: Enter commit message. Lines beginning with 'HG:' are removed.
314 HG: Leave message empty to abort commit. 314 HG: Leave message empty to abort commit.