aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Sanderson <zofrex@gmail.com>2016-05-19 00:54:54 +0100
committerJames Sanderson <zofrex@gmail.com>2016-05-19 00:54:54 +0100
commit6450da87ba36a48b85c34e0cec6eee520b86fe2c (patch)
treefe36c028f7af76e6b582f27ca2879ab08c239190
parent00a3452fa9def944d47de99415027c0455f63b3c (diff)
downloadmilf-rs-6450da87ba36a48b85c34e0cec6eee520b86fe2c.tar.gz
milf-rs-6450da87ba36a48b85c34e0cec6eee520b86fe2c.zip
Failing test for empty table on last line
-rw-r--r--src/parser.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 8fa2d77..68e12d5 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -1206,6 +1206,14 @@ trimmed in raw strings.
}
#[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]
fn fruit() {
let mut p = Parser::new(r#"
[[fruit]]