diff --git a/src/infer_type.rs b/src/infer_type.rs index 581ed67..60322a9 100644 --- a/src/infer_type.rs +++ b/src/infer_type.rs @@ -111,6 +111,19 @@ mod test { ); } + #[test] + fn test_with_leading_whitespace() { + assert_eq!( + infer_type(" POINT (10 20.1)").unwrap(), + (GeometryType::Point, Some(Dimension::XY)) + ); + + assert_eq!( + infer_type("POINT EMPTY").unwrap(), + (GeometryType::Point, None) + ); + } + #[test] fn lowercase_point() { assert_eq!(