diff options
Diffstat (limited to 'tests/test_spans.rs')
-rw-r--r-- | tests/test_spans.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_spans.rs b/tests/test_spans.rs index 9cc745c..aeb4a94 100644 --- a/tests/test_spans.rs +++ b/tests/test_spans.rs @@ -31,7 +31,7 @@ fn test() { if let Token::StartTag(tag) = token { if tag.name == "h1" { labels.push(Label::primary(file_id, tag.name_span).with_message("start tag")); - } else { + } else if tag.name == "input" { for attr in tag.attributes.values() { labels.push( Label::primary(file_id, attr.name_span.clone()).with_message("attr name"), @@ -45,6 +45,8 @@ fn test() { if tag.name == "h1" { labels.push(Label::primary(file_id, tag.name_span).with_message("end tag")); } + } else if let Token::Error { error, span } = token { + labels.push(Label::primary(file_id, span).with_message(error.to_string())); } } |