aboutsummaryrefslogtreecommitdiff
path: root/integration_tests
diff options
context:
space:
mode:
Diffstat (limited to 'integration_tests')
-rw-r--r--integration_tests/tests/test_html5lib.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/integration_tests/tests/test_html5lib.rs b/integration_tests/tests/test_html5lib.rs
index 2e404c5..bede29a 100644
--- a/integration_tests/tests/test_html5lib.rs
+++ b/integration_tests/tests/test_html5lib.rs
@@ -137,7 +137,14 @@ fn run_test_inner<R: Reader>(
self_closing: tag.self_closing,
}),
Token::EndTag(tag) => actual_tokens.push(TestToken::EndTag { name: tag.name }),
- Token::String(data) => actual_tokens.push(TestToken::Character(data)),
+ Token::Char(c) => {
+ // Coalesce all adjacent character tokens into a single string.
+ if let Some(TestToken::Character(s)) = actual_tokens.last_mut() {
+ s.push(c);
+ } else {
+ actual_tokens.push(TestToken::Character(c.into()));
+ }
+ }
Token::Comment(comment) => actual_tokens.push(TestToken::Comment(comment.data)),
Token::Doctype(doctype) => actual_tokens.push(TestToken::Doctype {
name: doctype.name,