From 56a7fcd37c2beb205db53d5ac7b8a897359b3ced Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Mon, 7 Oct 2024 19:11:16 -0400 Subject: [PATCH] add test with leading whitespace --- src/infer_type.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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!(