Added escapes test
This commit is contained in:
parent
c6f4aaef24
commit
19744aa63a
|
@ -203,8 +203,17 @@ mod tests {
|
||||||
RightCurly,
|
RightCurly,
|
||||||
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);
|
assert_eq!(result, expected);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue