Last change
on this file since 11974 was 11435, checked in by Don-vip, 7 years ago |
fix #14199 - JOSM drops empty tags on loading and thus prevents correcting them
|
-
Property svn:eol-style
set to
native
|
File size:
1.0 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.io;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertEquals;
|
---|
5 | import static org.junit.Assert.assertNull;
|
---|
6 | import static org.junit.Assert.assertTrue;
|
---|
7 |
|
---|
8 | import java.io.InputStream;
|
---|
9 |
|
---|
10 | import org.junit.Test;
|
---|
11 | import org.openstreetmap.josm.TestUtils;
|
---|
12 | import org.openstreetmap.josm.data.osm.Way;
|
---|
13 | import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Unit tests of {@link OsmReader} class.
|
---|
17 | */
|
---|
18 | public class OsmReaderTest {
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14199">Bug #14199</a>.
|
---|
22 | * @throws Exception if any error occurs
|
---|
23 | */
|
---|
24 | @Test
|
---|
25 | public void testTicket14199() throws Exception {
|
---|
26 | try (InputStream in = TestUtils.getRegressionDataStream(14199, "emptytag.osm")) {
|
---|
27 | Way w = OsmReader.parseDataSet(in, NullProgressMonitor.INSTANCE).getWays().iterator().next();
|
---|
28 | assertEquals(1, w.getKeys().size());
|
---|
29 | assertNull(w.get(" "));
|
---|
30 | assertTrue(w.isModified());
|
---|
31 | }
|
---|
32 | }
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.