diff --git a/test/data b/test/data index 76651203a..590d57c64 160000 --- a/test/data +++ b/test/data @@ -1 +1 @@ -Subproject commit 76651203a0918a7f85214d0ed561f15741d5e23f +Subproject commit 590d57c648858432d0a2c391a1d7dbb0a99b37a8 diff --git a/test/data-visual b/test/data-visual index 80e318b43..8544eb816 160000 --- a/test/data-visual +++ b/test/data-visual @@ -1 +1 @@ -Subproject commit 80e318b432b8ead2536df2ec7db96cc650e3eb1c +Subproject commit 8544eb8164be721c4e4788e018351a0354d2472a diff --git a/test/unit/datasource/geojson.cpp b/test/unit/datasource/geojson.cpp index 9bcacca95..6363cd185 100644 --- a/test/unit/datasource/geojson.cpp +++ b/test/unit/datasource/geojson.cpp @@ -117,6 +117,15 @@ TEST_CASE("geojson") { REQUIRE(feature != nullptr); REQUIRE(feature->envelope() == mapnik::box2d(123,456,123,456)); } - + SECTION("json - ensure input fully consumed and throw exception otherwise") + { + mapnik::parameters params; + params["type"] = "geojson"; + params["file"] = "./test/data/json/points-malformed.geojson"; // mismatched parentheses + params["cache-features"] = false; + REQUIRE_THROWS(mapnik::datasource_cache::instance().create(params)); + params["cache-features"] = true; + REQUIRE_THROWS(mapnik::datasource_cache::instance().create(params)); + } } }