Skip to content

Commit 912a050

Browse files
committed
Add test of parsing whitespace
1 parent 45f0dde commit 912a050

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/test.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -694,6 +694,15 @@ fn check_spans_internal(ts: TokenStream, lines: &mut &[(usize, usize, usize, usi
694694
}
695695
}
696696

697+
#[test]
698+
fn whitespace() {
699+
// space, horizontal tab, vertical tab, form feed, carriage return, line
700+
// feed, non-breaking space, left-to-right mark, right-to-left mark
701+
let various_spaces = " \t\u{b}\u{c}\r\n\u{a0}\u{200e}\u{200f}";
702+
let tokens = various_spaces.parse::<TokenStream>().unwrap();
703+
assert_eq!(tokens.into_iter().count(), 0);
704+
}
705+
697706
#[test]
698707
fn byte_order_mark() {
699708
let string = "\u{feff}foo";

0 commit comments

Comments
 (0)