On Tue, Jul 01, 2025 at 05:22:07PM -0400, Rae Moar wrote:
> On Thu, Jun 26, 2025 at 2:10 AM Thomas Weißschuh
> <[email protected]> wrote:

<snip>

> > -TEST_RESULT = re.compile(r'^\s*(ok|not ok) ([0-9]+) (- )?([^#]*)( # .*)?$')
> > +TEST_RESULT = re.compile(r'^\s*(ok|not ok) ([0-9]+)? ?(- )?([^#]*)( # 
> > .*)?$')
> >
> > -TEST_RESULT_SKIP = re.compile(r'^\s*(ok|not ok) ([0-9]+) (- )?(.*) # 
> > SKIP(.*)$')
> > +TEST_RESULT_SKIP = re.compile(r'^\s*(ok|not ok) ([0-9]+)? ?(- )?(.*) # 
> > SKIP ?(.*)$')
> 
> My concern with this patch is that this makes the test number optional
> ([0-9]+) -> ([0-9]+)? for both the test result regex matches. But if I
> do pass in KTAP containing a line where the test number is missing, it
> causes the parser to crash because other lines of the code rely on the
> match with the test number.
> 
> I would prefer if we keep the test number as required. This is
> integral to the KTAP specification and seems to be largely shared by
> different frameworks test output.

This part of the patch was actually unnecessary, so I dropped it.
Good catch, thanks.

<snip>

Reply via email to