# HG changeset patch # User Pierre-Yves David # Date 2014-05-30 19:12:12 # Node ID 9e9288b9463a7a9ed3902e69fcbd55a3686ba126 # Parent 7e14d026c4c4951b0feffedcf88a41056974e3b0 test-run-tests.t: test the --interactive option diff --git a/tests/test-run-tests.t b/tests/test-run-tests.t --- a/tests/test-run-tests.t +++ b/tests/test-run-tests.t @@ -143,3 +143,53 @@ Parallel runs (delete the duplicated test file) $ rm test-failure-copy.t + +Interactive run +=============== + +(backup the failing test) + $ cp test-failure.t backup + +Refuse the fix + + $ echo 'n' | $TESTDIR/run-tests.py --with-hg=`which hg` -i + + --- $TESTTMP/test-failure.t + +++ $TESTTMP/test-failure.t.err + @@ -1,2 +1,2 @@ + $ echo babar + - rataxes + + babar + + ERROR: test-failure.t output changed + Accept this change? [n] !. + Failed test-failure.t: output changed + # Ran 2 tests, 0 skipped, 0 warned, 1 failed. + python hash seed: * (glob) + [1] + + $ cat test-failure.t + $ echo babar + rataxes + +Accept the fix + + $ echo 'y' | $TESTDIR/run-tests.py --with-hg=`which hg` -i + + --- $TESTTMP/test-failure.t + +++ $TESTTMP/test-failure.t.err + @@ -1,2 +1,2 @@ + $ echo babar + - rataxes + + babar + + ERROR: test-failure.t output changed + Accept this change? [n] .. + # Ran 2 tests, 0 skipped, 0 warned, 0 failed. + + $ cat test-failure.t + $ echo babar + babar + +(reinstall) + $ mv backup test-failure.t