From 2d8f295354ce20f2d375a985ff48fd5e7f8b90ca Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Mon, 3 Dec 2018 13:51:41 +0100 Subject: WKTParser: fix to avoid creation of empty nodes --- test/unit/test_io.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/unit/test_io.cpp') diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp index 6a2de028..606d57a3 100644 --- a/test/unit/test_io.cpp +++ b/test/unit/test_io.cpp @@ -119,6 +119,11 @@ TEST(io, wkt_parsing) { str = "A[" + str + "]"; } EXPECT_THROW(WKTNode::createFrom(str), ParsingException); + + { + auto wkt = "A[\"a\",B[\"b\",C[\"c\"]],D[\"d\"]]"; + EXPECT_EQ(WKTNode::createFrom(wkt)->toString(), wkt); + } } // --------------------------------------------------------------------------- -- cgit v1.2.3