Ignore:
Timestamp:
2018-12-17T15:08:05+01:00 (5 years ago)
Author:
GerdP
Message:

see #17055 When harmonized value is only 3 characters reduce allowed Levenshtein distance from 2 to 1.

When shop=gas is not in presets, we don't want a message like "Value 'gas' for key 'shop' looks like one of [bag, car, yes]."
just because one character of those values matches.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TagCheckerTest.java

    r14517 r14571  
    154154
    155155    /**
     156     * Check for misspelled value.
     157     * @throws IOException if any I/O error occurs
     158     */
     159    @Test
     160    public void testShortValNotInPreset2() throws IOException {
     161        final List<TestError> errors = test(OsmUtils.createPrimitive("node shop=gas"));
     162        assertEquals(1, errors.size());
     163        assertEquals("Presets do not contain property value", errors.get(0).getMessage());
     164        assertEquals("Value 'gas' for key 'shop' not in presets.", errors.get(0).getDescription());
     165        assertEquals(Severity.OTHER, errors.get(0).getSeverity());
     166        assertFalse(errors.get(0).isFixable());
     167    }
     168
     169    /**
    156170     * Checks that tags specifically ignored are effectively not in internal presets.
    157171     * @throws IOException if any I/O error occurs
Note: See TracChangeset for help on using the changeset viewer.