JAL-1286 test input of gzip stream from local file
authorJim Procter <jprocter@compbio.dundee.ac.uk>
Thu, 7 Nov 2013 13:42:35 +0000 (13:42 +0000)
committerJim Procter <jprocter@compbio.dundee.ac.uk>
Thu, 7 Nov 2013 13:42:35 +0000 (13:42 +0000)
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"));
+  }
 }