comparison tests/run-tests.py @ 42505: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 4cbccb50df46
children 84aff7e20c55
comparison
equal deleted inserted replaced
42480:b6387a65851d 42505:c1850798f995
1746 if m: 1746 if m:
1747 conditions = [c for c in m.group(2).split(b' ')] 1747 conditions = [c for c in m.group(2).split(b' ')]
1748 1748
1749 el = m.group(1) + b"\n" 1749 el = m.group(1) + b"\n"
1750 if not self._iftest(conditions): 1750 if not self._iftest(conditions):
1751 retry = "retry" # Not required by listed features 1751 # listed feature missing, should not match
1752 return "retry", False
1752 1753
1753 if el.endswith(b" (esc)\n"): 1754 if el.endswith(b" (esc)\n"):
1754 if PYTHON3: 1755 if PYTHON3:
1755 el = el[:-7].decode('unicode_escape') + '\n' 1756 el = el[:-7].decode('unicode_escape') + '\n'
1756 el = el.encode('utf-8') 1757 el = el.encode('utf-8')