forked from AbleScript/ablescript
Added escapes test
This commit is contained in:
parent
58d8f22e30
commit
aafc03bba6
|
@ -203,8 +203,17 @@ mod tests {
|
|||
RightCurly,
|
||||
RightCurly,
|
||||
];
|
||||
let lexer = Token::lexer(code);
|
||||
let result: Vec<Token> = 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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue