Skip to content

Test UTF-8 identifier validation.#468

Closed
sunfishcode wants to merge 3 commits intoutf8from
utf8-tests
Closed

Test UTF-8 identifier validation.#468
sunfishcode wants to merge 3 commits intoutf8from
utf8-tests

Conversation

@sunfishcode
Copy link
Member

This adds tests to the utf8 branch for validating import module and field names, and custom section names.

This supersedes #450

  • add more tests for overlong encodings
  • add more tests for out-of-range code points
  • add more tests for UTF16 surrogate halves
  • add tests for obsolete 5-byte and 6-byte encodings
  • add tests for UTF16 and UTF32 BOMs
  • convert tests for invalid strings to use the binary format syntax so that decoding happens separately from parsing
  • add comments
  • test that a UTF-8 BOM is not rejected

Fix an error in the custom section lengths, so that the modules are
valid except for the particular aspect being tested.
@rossberg
Copy link
Member

rossberg commented May 5, 2017

Thanks! LGTM (reviewed offline, seems like GitHub can't handle UTF-8).

@rossberg
Copy link
Member

rossberg commented May 5, 2017

Argh, sorry I noticed too late that this is a PR against the utf8 branch, which I just landed. So you probably have to merge to master manually.

@sunfishcode
Copy link
Member Author

Github can handle UTF-8, but whoever created those files somehow left invalid byte sequences all over the place ;-). I've now changed the comments to escape those byte sequences, so that the files can be displayed without issue.

It looks like I can't change the target branch for this PR, so I'll create a new PR and merge that, with your LGTM here.

@sunfishcode sunfishcode closed this May 5, 2017
@sunfishcode sunfishcode mentioned this pull request May 5, 2017
dhil pushed a commit to dhil/webassembly-spec that referenced this pull request Nov 13, 2023
fix display of administrative instructions
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.

2 participants