Opened 7 years ago

Last modified 7 years ago

#17425 new enhancement

MapCSS assert, support test with context — at Version 2

Reported by: frodrigo Owned by: team
Priority: normal Milestone:
Component: Core validator Version:
Keywords: mapcss Cc:

Description (last modified by Don-vip)

For Osmose I run an other MapCSS validation implementation.
In some cases I need to run assert with context.
I add the assertNoMatchWithContext and assertMatchWithContext, and keep it on my side for now.

But now there is a similar need in the core JOSM MapCSS, territories.mapcss now contains tests (and this tests fails on my side).

*[name =~ /(?i).*Strasse.*/][name !~ /(?i).*Strasser.*/][inside("DE,AT")]

Territories selector inside() and outside() require context to be tested.

On my implementation I have added think like this:

assertNoMatchWithContext:list('node place=hamlet name="ZA Sud Loire"',"inside=FR")

Just for record, I have also language

*[name=~/ي/][language("fa")] {
  ...
  assertMatchWithContext:list('node name="روابط عمومي مجتمع مس شهربابك"','language=fa')
}

Change History (2)

comment:1 by Klumbumbus, 7 years ago

for reference: #17058

comment:2 by Don-vip, 7 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.