Skip to content

Commit 4c0bd28

Browse files
committed
Add regression test for issue 410
1 parent 12eddc0 commit 4c0bd28

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tests/test.rs

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,10 +328,17 @@ fn literal_span() {
328328
#[cfg(span_locations)]
329329
#[test]
330330
fn source_text() {
331-
let input = " 𓀕 ";
332-
let tokens = input.parse::<proc_macro2::TokenStream>().unwrap();
333-
let ident = tokens.into_iter().next().unwrap();
331+
let input = " 𓀕 c ";
332+
let mut tokens = input
333+
.parse::<proc_macro2::TokenStream>()
334+
.unwrap()
335+
.into_iter();
336+
337+
let ident = tokens.next().unwrap();
334338
assert_eq!("𓀕", ident.span().source_text().unwrap());
339+
340+
let ident = tokens.next().unwrap();
341+
assert_eq!("c", ident.span().source_text().unwrap()); // FIXME
335342
}
336343

337344
#[test]

0 commit comments

Comments
 (0)