Opened 3 years ago

Last modified 3 years ago

#17425 new enhancement

MapCSS assert, support test with context

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')

Attachments (0)

Change History (3)

comment:1 Changed 3 years ago by Klumbumbus

for reference: #17058

comment:2 Changed 3 years ago by Don-vip

Description: modified (diff)

comment:3 Changed 3 years ago by Don-vip

Keywords: mapcss added

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to frodrigo
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.