Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Process raw TAP output from STDIN #83

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

timgimyee
Copy link
Contributor

For #41.

@Leont
Copy link
Member

Leont commented Oct 29, 2018

But how to process TAP streams that don't start with 1..X?

@timgimyee
Copy link
Contributor Author

Just read TAP13 specs. Looks like the 1..N plan line is optional, and just a single ok or not ok is valid. Will need to check for these.

@Leont
Copy link
Member

Leont commented Oct 29, 2018

TAP can start with:

  • A plan
  • A version line
  • An ok/not ok line
  • A comment
  • A subtest line

I think that in that light a heuristic becomes quite fragile.

[#] # A comment
|
(?:
1\.\.\d | # A plan line
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that should be \d+, otherwise it would fail to match 1..10

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is only as good as tests. Good catch.

@arc
Copy link

arc commented Oct 30, 2018

This seems like a fragile approach to me. I'd prefer the "parse stdin" mode to be enabled with a new option to prove.

@Leont
Copy link
Member

Leont commented Oct 30, 2018

This seems like a fragile approach to me. I'd prefer the "parse stdin" mode to be enabled with a new option to prove.

Agreed

@timgimyee
Copy link
Contributor Author

An explicit option would be more robust.

@arc
Copy link

arc commented Oct 31, 2018

I was imagining the option would replace the heuristic parsing, rather than being an alternative to it. I think heuristic parsing of any sort is likely to cause problems, and Test::Harness risks being bound by backcompat with those problematic aspects.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants