aboutsummaryrefslogtreecommitdiff
path: root/src/tokenizer/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tokenizer/mod.rs')
-rw-r--r--src/tokenizer/mod.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/tokenizer/mod.rs b/src/tokenizer/mod.rs
index 78101f6..6793eb2 100644
--- a/src/tokenizer/mod.rs
+++ b/src/tokenizer/mod.rs
@@ -2446,15 +2446,17 @@ mod test {
let opts = opts();
let vector = vec![String::from("&\r\n"), String::from("&aamp;\r\n")];
- let expected = vec![
- (3, CharacterTokens("&\n".into())),
- (
- 3,
- ParseError(Error::CharRef(CharRefError::InvalidNamedCharRef)),
- ),
- (4, CharacterTokens("&aamp;\n".into())),
- ];
let results = tokenize(vector, opts);
- assert_eq!(results, expected);
+ assert_matches!(
+ &results[..],
+ [
+ (3, CharacterTokens(c1)),
+ (
+ 3,
+ ParseError(Error::CharRef(CharRefError::InvalidNamedCharRef)),
+ ),
+ (4, CharacterTokens(c2)),
+ ] if c1 == "&\n" && c2 == "&aamp;\n"
+ );
}
}