Ignore:
Timestamp:
2016-01-31T15:43:05+01:00 (9 years ago)
Author:
simon04
Message:

JOSM/photo_geotagging - Add failing unit test for #josm11902

Location:
applications/editors/josm/plugins/photo_geotagging/test
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/photo_geotagging/test/unit/org/openstreetmap/josm/plugins/photo_geotagging/ExifGPSTaggerTest.java

    r31994 r32037  
    11package org.openstreetmap.josm.plugins.photo_geotagging;
     2
     3import static junit.framework.Assert.assertFalse;
    24
    35import java.io.ByteArrayOutputStream;
    46import java.io.File;
    57import java.util.Date;
     8import java.util.Scanner;
    69
    710import org.apache.commons.imaging.Imaging;
     
    3336        new ExifRewriter().updateExifMetadataLossless(in, new ByteArrayOutputStream(), outputSet);
    3437    }
     38
     39    @Test
     40    public void testTicket11902() throws Exception {
     41        final File in = new File(TestUtils.getTestDataRoot(), "IMG_7250_small.JPG");
     42        final File out = tempFolder.newFile();
     43        ExifGPSTagger.setExifGPSTag(in, out, 12, 34, new Date(), 12.34, Math.E, Math.PI);
     44        final Process jhead = Runtime.getRuntime().exec(new String[]{"jhead", out.getAbsolutePath()});
     45        final String stdout = new Scanner(jhead.getErrorStream()).useDelimiter("\\A").next();
     46        System.out.println(stdout);
     47        assertFalse(stdout.contains("Suspicious offset of first Exif IFD value"));
     48    }
    3549}
Note: See TracChangeset for help on using the changeset viewer.