Fix and enhancement for VCP date tests #129
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch mainly applies to the
microformats-v2-unit/value/value-dttest set. Another test was simply renamed to reflect the specification's requirements probably being unintended (see parsing issue #66).Previously the
value-dttest had one repeated error: colons were used in time zone offsets, both in input and output. This is incorrect, both in that offsets are not supposed to have colons when normalized, and in that the comment at the top of the HTML input stated that the required formats for the test did not include offset-with-colon.This version of the test also shores up coverage in a few spots, namely:
textContentwhen an authoritative attribute yields an invalid value)The last case is one that the JS, JS-shiv, PHP, Python, Ruby-MicroMicro, and Rust parsers all get wrong (Elixir, Perl, and Ruby crash on the test as a whole). This is perhaps in part due to the VCP specification being arguably self-contradictory, with the date parsing section stating:
But the implied date section states:
Presumably the latter section means "otherwise it simply has a time (and no date) [and is therefore invalid]."