Test-More / test-more

Test2, Test::More, Test::Simple and Test::Builder Perl modules for writing tests
Other
140 stars 87 forks source link

async_subtest output incompatible with TAP14 spec #942

Open happy-barney opened 2 years ago

happy-barney commented 2 years ago

spec says that first result after subtest is a result of subtest so tools processing your output will report invalid reports

Example:

async_subtest ("foo" => sub {
    ok 1, "foo / foo";
})->finish;

ok 1, "bar";

will produce

ok 1 - foo {
    ok 1 - foo / foo
    1..1
}
ok 2 - bar
1..2

which will be parsed by TAP14 (or earlier) compatible parsers as:

exodist commented 1 year ago

Hmm, that sounds like a problem with TAP 14, which I helped with (I am in the authors section). The Test2 format predates TAP 14, and TAP 14 was specifically supposed to honor and support it. There must be an omission. Prior to TAP 14 the subtest format was not standardized and worked purely as indented lines were ignored by any conforming parser.

I will bring this up with the others who worked on TAP 14 at some point.

exodist commented 1 year ago

https://github.com/TestAnything/Specification/issues/34

happy-barney commented 1 year ago