JAL-1286 test input of gzip stream from local file
[jalview.git] / test / jalview / io / FileIOTester.java
index 62ce958..20f6d0f 100644 (file)
@@ -46,4 +46,14 @@ final static File ALIGN_FILE = new File("test/jalview/io/test_gz_fasta.gz");
     assertTrue("Gzipped data from '"+uri+"' identified as '"+type+"'",type.equalsIgnoreCase("FASTA"));
   }
 
+  @Test
+  public void testGziplocalFileIO() throws IOException
+  {
+    String filepath;
+    FileParse fp = new FileParse(filepath=ALIGN_FILE.getAbsoluteFile().toString(), AppletFormatAdapter.FILE);
+    assertTrue("Couldn't resolve " + filepath + " as a valid file", fp.isValid());
+    String type = new IdentifyFile().Identify(fp);
+    assertTrue("Gzipped data from '" + filepath + "' identified as '" + type
+            + "'", type.equalsIgnoreCase("FASTA"));
+  }
 }