[lexer] Add failing test for issue #12

This commit is contained in:
Eryn Wells 2018-08-27 06:56:48 -07:00
parent c14c939ad3
commit e61dc0b6a4

View file

@ -63,3 +63,12 @@ fn bool_long_false() {
assert_eq!(lex.next(), Some(Ok(expected_lex)));
assert_eq!(lex.next(), None);
}
#[test]
fn bool_with_spaces() {
// See issue #12
let expected_lex = Lex::new(Token::Bool(false), "#f", 0, 0);
let mut lex = Lexer::new(" #f ".chars());
assert_eq!(lex.next(), Some(Ok(expected_lex)));
assert_eq!(lex.next(), None);
}