mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-06 16:19:23 +00:00
LibWeb: Add remaining states to the Swift tokenizer
This includes all the DOCTYPE and Character reference states, as well as a few RAWTEXT ones that were missing by accident.
This commit is contained in:
parent
1ea236e454
commit
1383d03c02
Notes:
github-actions[bot]
2024-11-15 17:56:28 +00:00
Author: https://github.com/ADKaster
Commit: 1383d03c02
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2350
5 changed files with 790 additions and 7 deletions
|
@ -69,11 +69,13 @@ struct TestHTMLTokenizerSwift {
|
|||
#expect(tokenizer.state == HTMLTokenizer.State.Data) // initial state
|
||||
|
||||
let token = tokenizer.nextToken()
|
||||
#expect(token?.type == .EndOfFile)
|
||||
#expect(tokenizer.state == HTMLTokenizer.State.CharacterReference)
|
||||
#expect(token?.type == .Character(codePoint: "&"))
|
||||
|
||||
let token2 = tokenizer.nextToken()
|
||||
#expect(token2 == nil)
|
||||
#expect(token2?.type == .EndOfFile)
|
||||
|
||||
let token3 = tokenizer.nextToken()
|
||||
#expect(token3 == nil)
|
||||
}
|
||||
|
||||
@Test func tagOpenOnly() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue