Skip to content

Commit

Permalink
Add test of underscore token
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 27, 2021
1 parent 6e6bf56 commit 21f1da1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 21f1da1

Please sign in to comment.