D3880: tests: add test showing puzzling test output with (glob) lines
This revision was automatically updated to reflect the committed changes. Closed by commit rHG3fb46734508d: tests: add test showing puzzling test output with (glob) lines (authored by martinvonz, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3880?vs=9427&id=9451 REVISION DETAIL https://phab.mercurial-scm.org/D3880 AFFECTED FILES tests/test-run-tests.t CHANGE DETAILS 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 @@ -120,6 +120,52 @@ python hash seed: * (glob) [1] +test how multiple globs gets matched with lines in output + $ cat > test-failure-globs.t < $ echo "context"; echo "context"; \ + > echo "key: 1"; echo "value: not a"; \ + > echo "key: 2"; echo "value: not b"; \ + > echo "key: 3"; echo "value: c"; \ + > echo "key: 4"; echo "value: d" + > context + > context + > key: 1 + > value: a + > key: 2 + > value: b + > key: 3 + > value: * (glob) + > key: 4 + > value: * (glob) + > EOF + $ rt test-failure-globs.t + + --- $TESTTMP/test-failure-globs.t + +++ $TESTTMP/test-failure-globs.t.err + @@ -2,10 +2,10 @@ + context + context + key: 1 + - value: a + + value: * (glob) + key: 2 + - value: b + + value: * (glob) + key: 3 + - value: * (glob) + + value: c + key: 4 + - value: * (glob) + + value: d + + ERROR: test-failure-globs.t output changed + ! + Failed test-failure-globs.t: output changed + # Ran 1 tests, 0 skipped, 1 failed. + python hash seed: * (glob) + [1] + $ rm test-failure-globs.t + test diff colorisation #if no-windows pygments @@ -374,6 +420,7 @@ $ cat .testtimes test-empty.t * (glob) + test-failure-globs.t * (glob) test-failure-unicode.t * (glob) test-failure.t * (glob) test-success.t * (glob) To: martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D3880: tests: add test showing puzzling test output with (glob) lines
martinvonz updated this revision to Diff 9427. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3880?vs=9422&id=9427 REVISION DETAIL https://phab.mercurial-scm.org/D3880 AFFECTED FILES tests/test-run-tests.t CHANGE DETAILS 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 @@ -120,6 +120,52 @@ python hash seed: * (glob) [1] +test how multiple globs gets matched with lines in output + $ cat > test-failure-globs.t < $ echo "context"; echo "context"; \ + > echo "key: 1"; echo "value: not a"; \ + > echo "key: 2"; echo "value: not b"; \ + > echo "key: 3"; echo "value: c"; \ + > echo "key: 4"; echo "value: d" + > context + > context + > key: 1 + > value: a + > key: 2 + > value: b + > key: 3 + > value: * (glob) + > key: 4 + > value: * (glob) + > EOF + $ rt test-failure-globs.t + + --- $TESTTMP/test-failure-globs.t + +++ $TESTTMP/test-failure-globs.t.err + @@ -2,10 +2,10 @@ + context + context + key: 1 + - value: a + + value: * (glob) + key: 2 + - value: b + + value: * (glob) + key: 3 + - value: * (glob) + + value: c + key: 4 + - value: * (glob) + + value: d + + ERROR: test-failure-globs.t output changed + ! + Failed test-failure-globs.t: output changed + # Ran 1 tests, 0 skipped, 1 failed. + python hash seed: * (glob) + [1] + $ rm test-failure-globs.t + test diff colorisation #if no-windows pygments @@ -374,6 +420,7 @@ $ cat .testtimes test-empty.t * (glob) + test-failure-globs.t * (glob) test-failure-unicode.t * (glob) test-failure.t * (glob) test-success.t * (glob) To: martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
D3880: tests: add test showing puzzling test output with (glob) lines
martinvonz created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY When using multiple (glob) lines, the test runner often moves the lines around in the output on failure. I have run into this problem many times. The added test shows one example of this. Note that it doesn't show the mismatching lines and instead shows diff hunks that appear to replace a literal by a glob, and other hunks that should clearly match. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3880 AFFECTED FILES tests/test-run-tests.t CHANGE DETAILS 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 @@ -120,6 +120,52 @@ python hash seed: * (glob) [1] +test how multiple globs gets matched with lines in output + $ cat > test-failure-globs.t < $ echo "context"; echo "context"; \ + > echo "key: 1"; echo "value: not a"; \ + > echo "key: 2"; echo "value: not b"; \ + > echo "key: 3"; echo "value: c"; \ + > echo "key: 4"; echo "value: d" + > context + > context + > key: 1 + > value: a + > key: 2 + > value: b + > key: 3 + > value: * (glob) + > key: 4 + > value: * (glob) + > EOF + $ rt test-failure-globs.t + + --- $TESTTMP/test-failure-globs.t + +++ $TESTTMP/test-failure-globs.t.err + @@ -2,10 +2,10 @@ + context + context + key: 1 + - value: a + + value: * (glob) + key: 2 + - value: b + + value: * (glob) + key: 3 + - value: * (glob) + + value: c + key: 4 + - value: * (glob) + + value: d + + ERROR: test-failure-globs.t output changed + ! + Failed test-failure-globs.t: output changed + # Ran 1 tests, 0 skipped, 1 failed. + python hash seed: * (glob) + [1] + $ rm test-failure-globs.t + test diff colorisation #if no-windows pygments @@ -374,6 +420,7 @@ $ cat .testtimes test-empty.t * (glob) + test-failure-globs.t * (glob) test-failure-unicode.t * (glob) test-failure.t * (glob) test-success.t * (glob) To: martinvonz, #hg-reviewers Cc: mercurial-devel ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel