Skip to content

Commit

Permalink
Move all CDATA section tests into one file
Browse files Browse the repository at this point in the history
All other initial states are referenced outside the section 13.2.5
Tokenization[1] that describes the tokenizer state machine.

It's therefore reasonable to consider the 'CDATA section state'
an implementation detail and as such a tokenizer may choose to
avoid exposing it in it's public API.

In that scenario while all other tests could be integration tests
that solely use the public API, the tests for the 'CDATA section state'
would need to be performed internally rather than externally.

This commit moves all the 'CDATA section state' tests into a new
separate cdataSection.test file to faciliate such testing.

[1]: https://html.spec.whatwg.org/multipage/parsing.html#tokenization
  • Loading branch information
not-my-profile committed Aug 15, 2023
1 parent 8b45ec2 commit 829de4a
Show file tree
Hide file tree
Showing 4 changed files with 452 additions and 447 deletions.
2 changes: 1 addition & 1 deletion tokenizer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ tokenizer state which can be one of the following:
- `RCDATA state`
- `RAWTEXT state`
- `Script data state`
- `CDATA section state`
- `CDATA section state` (only occurs in `cdataSection.test`)

The test should be run once for each string, using it
to set the tokenizer's initial state for that run. If
Expand Down
Loading

0 comments on commit 829de4a

Please sign in to comment.