From 1744b330ee8218b39340e418feaf453538fc066b Mon Sep 17 00:00:00 2001 From: Emillio Mariscal Date: Thu, 22 Feb 2024 10:24:55 -0300 Subject: [PATCH] Test for validation of underscores at the beginnig of keys --- src/testsuite/libunderpass.all/val-test.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/testsuite/libunderpass.all/val-test.cc b/src/testsuite/libunderpass.all/val-test.cc index a8827254..301ea5ee 100644 --- a/src/testsuite/libunderpass.all/val-test.cc +++ b/src/testsuite/libunderpass.all/val-test.cc @@ -183,7 +183,6 @@ test_semantic(std::shared_ptr &plugin) { } node.addTag("building", "yes"); - // Has an invalid key=value ... node.addTag("building:material", "sponge"); status = plugin->checkNode(node, "building"); @@ -216,6 +215,16 @@ test_semantic(std::shared_ptr &plugin) { return 1; } + // Has an invalid key=value + node.addTag("__building", "yes"); + status = plugin->checkNode(node, "building"); + if (status->hasStatus(badvalue)) { + runtest.pass("Validate::checkNode(bad value) [semantic building]"); + } else { + runtest.fail("Validate::checkNode(bad value) [semantic building]"); + return 1; + } + // Way - checkWay() auto way = readOsmWayFromFile("/testsuite/testdata/validation/building.osc");