Failing test for empty table on last line

This commit is contained in:
James Sanderson 2016-05-19 00:54:54 +01:00
parent 00a3452fa9
commit 6450da87ba

View file

@ -1205,6 +1205,14 @@ trimmed in raw strings.
table.lookup("foo.1.bar").unwrap().as_table().unwrap(); table.lookup("foo.1.bar").unwrap().as_table().unwrap();
} }
#[test]
fn empty_table() {
let mut p = Parser::new(r#"
[foo]"#);
let table = Table(p.parse().unwrap());
table.lookup("foo").unwrap().as_table().unwrap();
}
#[test] #[test]
fn fruit() { fn fruit() {
let mut p = Parser::new(r#" let mut p = Parser::new(r#"