Add test of underscore token

This commit is contained in:
David Tolnay
2021-12-26 22:31:02 -08:00
parent d8892aa69f
commit ab40cf85f8
+7
View File
@@ -263,6 +263,13 @@ fn test_ident() {
assert_eq!(expected, tokens.to_string());
}
#[test]
fn test_underscore() {
let tokens = quote!(let _;);
let expected = "let _ ;";
assert_eq!(expected, tokens.to_string());
}
#[test]
fn test_duplicate() {
let ch = 'x';