[PATCH 5 of 9] run-tests: document the `pos` variable in the matching code
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Sun Sep 8 04:05:39 EDT 2019
On 9/7/19 2:59 PM, Joerg Sonnenberger wrote:
> On Sat, Sep 07, 2019 at 02:16:44PM +0200, Pierre-Yves David wrote:
>> diff --git a/tests/run-tests.py b/tests/run-tests.py
>> --- a/tests/run-tests.py
>> +++ b/tests/run-tests.py
>> @@ -1609,6 +1609,9 @@ class TTest(Test):
>> if exitcode != 0:
>> warnonly = WARN_NO
>>
>> + # `pos` is the key for the currently expected output it should match an
>> + # entry in `expected`. This `pos` is provided by "command" in the
>> + # output stream. These command are recognised using the `salt`
>
> That should be *on* entry.
What do you mean ? That is should be "`pos` is the key for the currently
expected output it should match on entry in expected?"
>
>> pos = -1
>> postout = []
>> for out_rawline in output:
>> @@ -1628,6 +1631,7 @@ class TTest(Test):
>> optional = []
>> for i, el in enumerate(els):
>> r = False
>> + assert el is None or bool(el)
>> if el:
>> r, exact = self.linematch(el, out_line)
>> if isinstance(r, str):
>
> Is this chunk intentional?
Oops, I forgot to split it out.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list