Changeset 36437 in osm
- Timestamp:
- 2025-05-01T00:53:15+02:00 (6 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/photo_geotagging/test/unit/org/openstreetmap/josm/plugins/photo_geotagging/ExifGPSTaggerTest.java
r36436 r36437 5 5 import static org.junit.jupiter.api.Assertions.assertDoesNotThrow; 6 6 import static org.junit.jupiter.api.Assertions.assertEquals; 7 import static org.junit.jupiter.api.Assertions.assertFalse;8 7 9 8 import java.io.ByteArrayOutputStream; 10 9 import java.io.File; 10 import java.io.IOException; 11 11 import java.time.Instant; 12 import java.util.Scanner;13 12 14 13 import org.apache.commons.imaging.Imaging; … … 17 16 import org.apache.commons.imaging.formats.tiff.TiffImageMetadata; 18 17 import org.apache.commons.imaging.formats.tiff.write.TiffOutputSet; 19 import org.junit.jupiter.api. Disabled;18 import org.junit.jupiter.api.Assumptions; 20 19 import org.junit.jupiter.api.Test; 21 20 import org.junit.jupiter.api.io.TempDir; … … 59 58 60 59 @Test 61 @Disabled("To enable after https://josm.openstreetmap.de/ticket/11902 is fixed")62 60 void testTicket11902() throws Exception { 63 61 final File in = new File(TestUtils.getTestDataRoot(), "IMG_7250_small.JPG"); … … 65 63 final ImageEntry image = newImageEntry("test", 12d, 34d, Instant.now(), 12.34d, Math.E, Math.PI); 66 64 ExifGPSTagger.setExifGPSTag(in, out, image, true); 67 final Process jhead = Runtime.getRuntime().exec(new String[]{"jhead", out.getAbsolutePath()}); 68 final String stdout = new Scanner(jhead.getErrorStream()).useDelimiter("\\A").next(); 69 System.out.println(stdout); 70 assertFalse(stdout.contains("Suspicious offset of first Exif IFD value")); 65 try { 66 final Process jhead = Runtime.getRuntime().exec(new String[]{"jhead", out.getAbsolutePath()}); 67 assertEquals(jhead.getErrorStream().available(), 0); 68 } catch (IOException e) { /* jhead not installed */ 69 System.out.println(e); 70 Assumptions.assumeTrue(false); 71 } 71 72 } 72 73
Note:
See TracChangeset
for help on using the changeset viewer.