Skip to content

Commit

Permalink
Test for validation of underscores at the beginnig of keys
Browse files Browse the repository at this point in the history
  • Loading branch information
emi420 committed Feb 22, 2024
1 parent 7756a57 commit 1744b33
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/testsuite/libunderpass.all/val-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ test_semantic(std::shared_ptr<Validate> &plugin) {
}

node.addTag("building", "yes");

// Has an invalid key=value ...
node.addTag("building:material", "sponge");
status = plugin->checkNode(node, "building");
Expand Down Expand Up @@ -216,6 +215,16 @@ test_semantic(std::shared_ptr<Validate> &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");
Expand Down

0 comments on commit 1744b33

Please sign in to comment.