From 4ac0078cdbea3fdb395c62077290e6368f13533d Mon Sep 17 00:00:00 2001 From: XX Date: Sun, 8 Apr 2018 16:25:56 +0300 Subject: Fix initialy set arr path --- src/path/parser.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/path/parser.rs') diff --git a/src/path/parser.rs b/src/path/parser.rs index 7629193..3ec433e 100644 --- a/src/path/parser.rs +++ b/src/path/parser.rs @@ -101,6 +101,15 @@ mod test { let expected = Child(Box::new(Identifier("abcd".into())), "efgh".into()); assert_eq!(parsed, expected); + + let parsed: Expression = from_str("abcd.efgh.ijkl").unwrap(); + let expected = Child(Box::new( + Child(Box::new( + Identifier("abcd".into()) + ), "efgh".into()) + ), "ijkl".into()); + + assert_eq!(parsed, expected); } #[test] -- cgit v1.2.3