Changeset 15070 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2019-05-11T20:24:40+02:00 (6 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/io/session/SessionReaderTest.java
r14138 r15070 6 6 import static org.junit.Assert.assertTrue; 7 7 8 import java.io.ByteArrayInputStream; 8 9 import java.io.File; 9 10 import java.io.IOException; 11 import java.io.InputStream; 12 import java.nio.charset.StandardCharsets; 10 13 import java.util.List; 11 14 … … 154 157 assertEquals(174, layer.getNoteData().getNotes().size()); 155 158 } 159 160 /** 161 * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/17701">Bug #17701</a>. 162 * @throws Exception if an error occurs 163 */ 164 @Test 165 public void testTicket17701() throws Exception { 166 try (InputStream in = new ByteArrayInputStream(("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + 167 "<josm-session version=\"0.1\">\n" + 168 " <layers active=\"1\">\n" + 169 " <layer index=\"1\" name=\"GPS-треки OpenStreetMap\" type=\"imagery\" version=\"0.1\" visible=\"true\">\n" + 170 " <id>osm-gps</id>\n" + 171 " <type>tms</type>\n" + 172 " <url>https://{switch:a,b,c}.gps-tile.openstreetmap.org/lines/{zoom}/{x}/{y}.png</url>\n" + 173 " <attribution-text>© OpenStreetMap contributors</attribution-text>\n" + 174 " <attribution-url>https://www.openstreetmap.org/copyright</attribution-url>\n" + 175 " <max-zoom>20</max-zoom>\n" + 176 " <cookies/>\n" + 177 " <description>Общедоступные GPS-треки, загруженные на OpenStreetMap.</description>\n" + 178 " <valid-georeference>true</valid-georeference>\n" + 179 " <overlay>true</overlay>\n" + 180 " <show-errors>true</show-errors>\n" + 181 " <automatic-downloading>true</automatic-downloading>\n" + 182 " <automatically-change-resolution>true</automatically-change-resolution>\n" + 183 " </layer>\r\n" + 184 " </layers>\n" + 185 "</josm-session>").getBytes(StandardCharsets.UTF_8))) { 186 SessionReader reader = new SessionReader(); 187 reader.loadSession(in, null, false, null); 188 assertTrue(reader.getLayers().isEmpty()); 189 } 190 } 156 191 }
Note:
See TracChangeset
for help on using the changeset viewer.