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

require test point ID or hyphen-minus when description exists #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
require test point ID or hyphen-minus when description exists
This avoids parsing ambiguity:

    1..1
    ok 1 is less than 2

Is "1" part of the description, or is it the test point ID?  This
change makes it clear that the "1" is the test point ID, and the
description is "is less than 2".  To force the "1" to be part of the
description, that line should read:

    ok - 1 is less than 2

or:

    ok 1 1 is less than 2

or (preferred):

    ok 1 - 1 is less than 2
  • Loading branch information
rhansen committed Aug 15, 2024
commit 779ea7c5fa084e11690c31c12625469dab1155e7
2 changes: 1 addition & 1 deletion tap-version-14-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ TAPDocument := Version Plan Body | Version Body Plan
Version := "TAP version 14\n"
Plan := "1.." (Number) (" # " Reason)? "\n"
Body := (TestPoint | BailOut | Pragma | Comment | Anything | Empty | Subtest)*
TestPoint := ("not ")? "ok" (" " Number)? ((" -")? (" " Description) )? (" " Directive)? "\n" (YAMLBlock)?
TestPoint := ("not ")? "ok" ((" " Number (" -")? | " -") (" " Description)?)? (" " Directive)? "\n" (YAMLBlock)?
Directive := " # " ("todo" | "skip") (" " Reason)?
YAMLBlock := " ---\n" (YAMLLine)* " ...\n"
YAMLLine := " " (YAML)* "\n"
Expand Down