diff --git a/ablescript/src/lexer.rs b/ablescript/src/lexer.rs index 61da475..c6b6e67 100644 --- a/ablescript/src/lexer.rs +++ b/ablescript/src/lexer.rs @@ -203,8 +203,17 @@ mod tests { RightCurly, RightCurly, ]; - let lexer = Token::lexer(code); - let result: Vec = lexer.collect(); + + let result: Vec<_> = Token::lexer(code).collect(); + assert_eq!(result, expected); + } + + #[test] + fn escapes() { + let code = r#"/*»"720B""722B""7195"«*/"#; + let expected = &[Token::String("»にゃぁ«".to_owned())]; + + let result: Vec<_> = Token::lexer(code).collect(); assert_eq!(result, expected); } }