Mercurial > hg-stable
changeset 42177:c1850798f995 stable
run-tests: stop matching line for missing feature
Before this change, the following unified test input would silently pass
$ echo foo
foo (false !)
After this change, the "foo" output is properly detected as unexpected.
The output of an handful of test had to be updated from broken conditional (that
ended up working by chance).
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 19 Jun 2019 05:37:33 +0200 |
parents | b6387a65851d |
children | cd73e51a1f8a |
files | tests/run-tests.py tests/test-copies.t tests/test-extension.t tests/test-narrow-clone-stream.t tests/test-narrow-widen-no-ellipsis.t tests/test-run-tests.t |
diffstat | 6 files changed, 83 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/run-tests.py Sun Jun 16 12:31:07 2019 +0900 +++ b/tests/run-tests.py Wed Jun 19 05:37:33 2019 +0200 @@ -1748,7 +1748,8 @@ el = m.group(1) + b"\n" if not self._iftest(conditions): - retry = "retry" # Not required by listed features + # listed feature missing, should not match + return "retry", False if el.endswith(b" (esc)\n"): if PYTHON3:
--- a/tests/test-copies.t Sun Jun 16 12:31:07 2019 +0900 +++ b/tests/test-copies.t Wed Jun 19 05:37:33 2019 +0200 @@ -498,6 +498,7 @@ $ hg debugpathcopies 0 4 x -> z (filelog !) y -> z (compatibility !) + y -> z (changeset !) $ hg debugpathcopies 1 5 $ hg debugpathcopies 2 5 $ hg debugpathcopies 0 5
--- a/tests/test-extension.t Sun Jun 16 12:31:07 2019 +0900 +++ b/tests/test-extension.t Wed Jun 19 05:37:33 2019 +0200 @@ -84,8 +84,8 @@ uipopulate called (1 times) uipopulate called (1 times) (chg !) uipopulate called (1 times) (chg !) - uipopulate called (1 times) (chg !) - reposetup called for a (chg !) + uipopulate called (1 times) + reposetup called for a ui == repo.ui Foo $ hg foo --debug @@ -96,8 +96,8 @@ uipopulate called (1 times) uipopulate called (1 times) (chg !) uipopulate called (1 times) (chg !) - uipopulate called (1 times) (chg !) - reposetup called for a (chg !) + uipopulate called (1 times) + reposetup called for a ui == repo.ui Foo @@ -107,7 +107,7 @@ uisetup called [status] (no-chg !) uipopulate called (1 times) uipopulate called (1 times) (chg !) - uipopulate called (1 times) (chg !) + uipopulate called (1 times) reposetup called for a ui == repo.ui uipopulate called (1 times)
--- a/tests/test-narrow-clone-stream.t Sun Jun 16 12:31:07 2019 +0900 +++ b/tests/test-narrow-clone-stream.t Wed Jun 19 05:37:33 2019 +0200 @@ -61,8 +61,10 @@ Making sure we have the correct set of requirements $ cat .hg/requires - dotencode (tree flat-fncache !) - fncache (tree flat-fncache !) + dotencode (tree !) + dotencode (flat-fncache !) + fncache (tree !) + fncache (flat-fncache !) generaldelta narrowhg-experimental revlogv1 @@ -75,8 +77,9 @@ $ ls .hg/store/ 00changelog.i 00manifest.i - data (tree flat-fncache !) - fncache (tree flat-fncache !) + data + fncache (tree !) + fncache (flat-fncache !) meta (tree !) narrowspec undo
--- a/tests/test-narrow-widen-no-ellipsis.t Sun Jun 16 12:31:07 2019 +0900 +++ b/tests/test-narrow-widen-no-ellipsis.t Wed Jun 19 05:37:33 2019 +0200 @@ -124,7 +124,7 @@ adding manifests adding widest/ revisions (tree !) adding file changes - adding widest/f revisions (tree !) + adding widest/f revisions added 0 changesets with 1 changes to 1 files bundle2-input-part: total payload size * (glob) bundle2-input-bundle: 0 parts total
--- a/tests/test-run-tests.t Sun Jun 16 12:31:07 2019 +0900 +++ b/tests/test-run-tests.t Wed Jun 19 05:37:33 2019 +0200 @@ -1936,3 +1936,70 @@ running 1 tests using 1 parallel processes . # Ran 1 tests, 0 skipped, 0 failed. + +Test conditional output matching +================================ + + $ cat << EOF >> test-conditional-matching.t + > #testcases foo bar + > $ echo richtig + > richtig (true !) + > $ echo falsch + > falsch (false !) + > #if foo + > $ echo arthur + > arthur (bar !) + > #endif + > $ echo celeste + > celeste (foo !) + > $ echo zephir + > zephir (bar !) + > EOF + + $ rt test-conditional-matching.t + running 2 tests using 1 parallel processes + + --- $TESTTMP/anothertests/cases/test-conditional-matching.t + +++ $TESTTMP/anothertests/cases/test-conditional-matching.t#bar.err + @@ -3,11 +3,13 @@ + richtig (true !) + $ echo falsch + falsch (false !) + + falsch + #if foo + $ echo arthur + arthur \(bar !\) (re) + #endif + $ echo celeste + celeste \(foo !\) (re) + + celeste + $ echo zephir + zephir \(bar !\) (re) + + ERROR: test-conditional-matching.t#bar output changed + ! + --- $TESTTMP/anothertests/cases/test-conditional-matching.t + +++ $TESTTMP/anothertests/cases/test-conditional-matching.t#foo.err + @@ -3,11 +3,14 @@ + richtig (true !) + $ echo falsch + falsch (false !) + + falsch + #if foo + $ echo arthur + arthur \(bar !\) (re) + + arthur + #endif + $ echo celeste + celeste \(foo !\) (re) + $ echo zephir + zephir \(bar !\) (re) + + zephir + + ERROR: test-conditional-matching.t#foo output changed + ! + Failed test-conditional-matching.t#bar: output changed + Failed test-conditional-matching.t#foo: output changed + # Ran 2 tests, 0 skipped, 2 failed. + python hash seed: * (glob) + [1]