Modify

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#17555 closed enhancement (worksforme)

assertMatch assertNoMatch for tags with spaces in them

Reported by: mkoniecz Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: template_report Cc:

Description (last modified by mkoniecz)

What steps will reproduce the problem?

  1. try assertMatch: "node gnis:Class=Populated Place place=town";
  2. try assertMatch: "node gnis:Class="Populated Place" place=town";
  3. try assertMatch: "node gnis:Class='Populated Place' place=town";

What is the expected result?

One of them works or some other syntax works or https://josm.openstreetmap.de/wiki/Help/Validator/MapCSSTagChecker#Syntax specifies that tags with spaces are not supported.

What happens instead?

None works.

Please provide any additional information below. Attach a screenshot if possible.

This is cause for bug present in https://josm.openstreetmap.de/ticket/17547#comment:3 that was applied (what is really embarrassing to me as I was fix of a previous bug and introduced bug in test itself!). Curiously, fix rule itself works despite that file is described as not loaded (at least manual part of my testing seems to be working).

I looked for parser but I found only /test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java with grep -nR assertNoMatch | grep -v data/validator/ and test/unit/org/openstreetmap/josm/data/validation/tests/MapCSSTagCheckerTest.java with grep -nR assertMatch | grep -v data/validator/

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-04-03 00:33:43 +0200 (Wed, 03 Apr 2019)
Build-Date:2019-04-03 01:30:50
Revision:14954
Relative:URL: ^/trunk

Identification: JOSM/1.5 (14954 en) Linux Ubuntu 16.04.6 LTS
Memory Usage: 434 MB / 869 MB (286 MB allocated, but free)
Java version: 1.8.0_201-b09, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080

Plugins:
+ OpeningHoursEditor (34867)
+ buildings_tools (34904)
+ continuosDownload (82)
+ imagery_offset_db (34867)
+ measurement (34867)
+ reverter (34961)
+ todo (30306)

Validator rules:
+ ${HOME}/Documents/install_moje/OSM software/josm/data/validator/deprecated.mapcss
+ ${HOME}/Documents/install_moje/OSM software/josm/data/validator/unnecessary.mapcss
+ ${HOME}/Documents/install_moje/OSM software/josm/data/validator/combinations.mapcss

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- W: Expecting test '{0.tag} is unnecessary for {1.tag}' (i.e., [way[foot'REGEX'^(yes|designated)$][highway'REGEX'^(footway|pedestrian)$][!access], way[bicycle'REGEX'^(yes|designated)$][highway=cycleway][!vehicle][!access][foot'NEQ'designated], *[building:ruian:type=2][building=farm_auxiliary], *[building:ruian:type=7][building=house], *[building:ruian:type=11][building=hotel], *[building:ruian:type=12][building=warehouse], *[building:ruian:type=13][building=barn], *[building:ruian:type=18][building=garage], *[building:ruian:type=21][building=greenhouse], *[gnis:Class=Populated Place][place=city], *[gnis:Class=Populated Place][place=town], *[gnis:Class=Populated Place][place=village], *[gnis:Class=Populated Place][place=hamlet], *[gnis:Class=Summit][natural=peak]]) to match node gnis:Class=Populated Place place=town (i.e., TagMap[gnis:Class=Populated,Place=place=town])
- W: Expecting test '{0.tag} is unnecessary for {1.tag}' (i.e., [way[foot'REGEX'^(yes|designated)$][highway'REGEX'^(footway|pedestrian)$][!access], way[bicycle'REGEX'^(yes|designated)$][highway=cycleway][!vehicle][!access][foot'NEQ'designated], *[building:ruian:type=2][building=farm_auxiliary], *[building:ruian:type=7][building=house], *[building:ruian:type=11][building=hotel], *[building:ruian:type=12][building=warehouse], *[building:ruian:type=13][building=barn], *[building:ruian:type=18][building=garage], *[building:ruian:type=21][building=greenhouse], *[gnis:Class=Populated Place][place=city], *[gnis:Class=Populated Place][place=town], *[gnis:Class=Populated Place][place=village], *[gnis:Class=Populated Place][place=hamlet], *[gnis:Class=Summit][natural=peak]]) to match node gnis:Class='Populated Place' place=town (i.e., TagMap[Place'=place=town,gnis:Class='Populated])
- W: Expecting test '{0.tag} is unnecessary for {1.tag}' (i.e., [way[foot'REGEX'^(yes|designated)$][highway'REGEX'^(footway|pedestrian)$][!access], way[bicycle'REGEX'^(yes|designated)$][highway=cycleway][!vehicle][!access][foot'NEQ'designated], *[building:ruian:type=2][building=farm_auxiliary], *[building:ruian:type=7][building=house], *[building:ruian:type=11][building=hotel], *[building:ruian:type=12][building=warehouse], *[building:ruian:type=13][building=barn], *[building:ruian:type=18][building=garage], *[building:ruian:type=21][building=greenhouse], *[gnis:Class=Populated Place][place=city], *[gnis:Class=Populated Place][place=town], *[gnis:Class=Populated Place][place=village], *[gnis:Class=Populated Place][place=hamlet], *[gnis:Class=Summit][natural=peak]]) to match node gnis:Class='Populated Place' place=town (i.e., TagMap[Place'=place=town,gnis:Class='Populated])
- E: Skipping to the next rule, because of an error:
- E: org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException: Encountered " "~" "~ "" at line 108, column 14.
- W: org.openstreetmap.josm.gui.mappaint.mapcss.parsergen.ParseException: Reached end of file while parsing
- W: Expecting test '{0.tag} is unnecessary for {1.tag}' (i.e., [way[foot'REGEX'^(yes|designated)$][highway'REGEX'^(footway|pedestrian)$][!access], way[bicycle'REGEX'^(yes|designated)$][highway=cycleway][!vehicle][!access][foot'NEQ'designated], *[building:ruian:type=2][building=farm_auxiliary], *[building:ruian:type=7][building=house], *[building:ruian:type=11][building=hotel], *[building:ruian:type=12][building=warehouse], *[building:ruian:type=13][building=barn], *[building:ruian:type=18][building=garage], *[building:ruian:type=21][building=greenhouse], *[gnis:Class=Populated Place][place=city], *[gnis:Class=Populated Place][place=town], *[gnis:Class=Populated Place][place=village], *[gnis:Class=Populated Place][place=hamlet], *[gnis:Class=Summit][natural=peak]]) to match node gnis:Class=Populated Place place=town (i.e., TagMap[gnis:Class=Populated,Place=place=town])

Attachments (0)

Change History (6)

comment:1 by mkoniecz, 6 years ago

Description: modified (diff)

comment:2 by mkoniecz, 6 years ago

Description: modified (diff)

comment:3 by Don-vip, 6 years ago

In 14963/josm:

see #17547 see #17555 - disable syntax not yet supported

comment:4 by simon04, 5 years ago

In 15761/josm:

see #17555 - Spaces in assertMatch and assertNoMatch

comment:5 by simon04, 5 years ago

Resolution: worksforme
Status: newclosed

comment:6 by Klumbumbus, 5 years ago

In 15765/josm:

see #17555, see #18374 - enable asserts

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.