Skip to content

Commit 8cccfe2

Browse files
committed
Add tuple indexing test
1 parent 3f9b24d commit 8cccfe2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,3 +469,13 @@ fn default_tokenstream_is_empty() {
469469

470470
assert!(default_token_stream.is_empty());
471471
}
472+
473+
#[test]
474+
fn tuple_indexing() {
475+
// This behavior may change depending on https://github.com/rust-lang/rust/pull/71322
476+
let mut tokens = "tuple.0.0".parse::<TokenStream>().unwrap().into_iter();
477+
assert_eq!("tuple", tokens.next().unwrap().to_string());
478+
assert_eq!(".", tokens.next().unwrap().to_string());
479+
assert_eq!("0.0", tokens.next().unwrap().to_string());
480+
assert!(tokens.next().is_none());
481+
}

0 commit comments

Comments
 (0)