Changeset 6208 in josm for trunk


Ignore:
Timestamp:
2013-08-30T01:19:26+02:00 (11 years ago)
Author:
Don-vip
Message:

fix #9027 - fix error in internal preset introduced in r6195 (patch by skyper) + validation check in build.xml and junit test (patch by AlfonZ)

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/build.xml

    r6144 r6208  
    6262</echo>
    6363    </target>
    64     <target name="dist" depends="compile,create-revision">
     64    <target name="check-schemas">
     65        <schemavalidate file="data/defaultpresets.xml" >
     66            <schema namespace="http://josm.openstreetmap.de/tagging-preset-1.0" file="data/tagging-preset.xsd" />
     67        </schemavalidate>
     68        <schemavalidate file="styles/standard/elemstyles.xml" >
     69            <schema namespace="http://josm.openstreetmap.de/mappaint-style-1.0" file="data/mappaint-style.xsd" />
     70        </schemavalidate>
     71    </target>
     72    <target name="dist" depends="compile,create-revision,check-schemas">
    6573        <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
    6674            <env key="LANG" value="C"/>
  • trunk/data/defaultpresets.xml

    r6200 r6208  
    44214421            <link href="http://wiki.openstreetmap.org/wiki/Tag:sport=skating"
    44224422                  uk.href="http://wiki.openstreetmap.org/wiki/Uk:Tag:sport=skating" />
    4423             <label text="Edit Skating" />
    4424             <key key="sport" value="skating" values_context="sport" />
     4423            <label text="Edit Skating" text_context="sport" />
     4424            <key key="sport" value="skating" />
    44254425            <text key="name" text="Name" />
    44264426            <combo key="leisure" text="type" values="ice_rink,pitch,sports_centre,stadium" default="ice_rink" />
  • trunk/test/unit/org/openstreetmap/josm/gui/tagging/TaggingPresetReaderTest.java

    r6144 r6208  
    6464    }
    6565
     66    /**
     67     * Validate internal presets
     68     * See #9027
     69     */
     70    @Test
     71    public void readDefaulPresets() throws SAXException, IOException {
     72        String presetfile = "resource://data/defaultpresets.xml";
     73        final Collection<TaggingPreset> presets = TaggingPresetReader.readAll(presetfile, true);
     74        Assert.assertTrue("Default presets are empty", presets.size()>0);
     75    }
     76   
    6677}
Note: See TracChangeset for help on using the changeset viewer.