From ea7d610e641753af7bf54fc778a4c3564ae51014 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 20 Feb 2014 15:17:36 +0000 Subject: [PATCH] test and data for JAL-1447 --- test/jalview/io/FileIOTester.java | 16 ++++++++++++++++ test/jalview/io/test_fasta_stars.fa | 8 ++++++++ test/jalview/io/test_fasta_stars2.fa | 4 ++++ 3 files changed, 28 insertions(+) create mode 100644 test/jalview/io/test_fasta_stars.fa create mode 100644 test/jalview/io/test_fasta_stars2.fa diff --git a/test/jalview/io/FileIOTester.java b/test/jalview/io/FileIOTester.java index d438424..5d10c35 100644 --- a/test/jalview/io/FileIOTester.java +++ b/test/jalview/io/FileIOTester.java @@ -53,6 +53,8 @@ public class FileIOTester final static File ALIGN_FILE = new File("test/jalview/io/test_gz_fasta.gz"); final static File NOTGZALIGN_FILE = new File("test/jalview/io/test_gz_fasta_notgz.gz"); + final static File STARS_FA_FILE1 = new File("test/jalview/io/test_fasta_stars.fa"); + final static File STARS_FA_FILE2 = new File("test/jalview/io/test_fasta_stars2.fa"); private void assertValidFormat(String fmt, String src, FileParse fp) { @@ -61,6 +63,20 @@ public class FileIOTester assertTrue("Data from '"+src+"' Expected to be '"+fmt+"' identified as '"+type+"'",type.equalsIgnoreCase(fmt)); } @Test + public void testStarsInFasta1() throws IOException + { + String uri; + FileParse fp = new FileParse(uri=STARS_FA_FILE1.getAbsoluteFile().toString(),AppletFormatAdapter.FILE); + assertValidFormat("FASTA", uri, fp); + } + @Test + public void testStarsInFasta2() throws IOException + { + String uri; + FileParse fp = new FileParse(uri=STARS_FA_FILE2.getAbsoluteFile().toString(),AppletFormatAdapter.FILE); + assertValidFormat("FASTA", uri, fp); + } + @Test public void testGzipIo() throws IOException { String uri; diff --git a/test/jalview/io/test_fasta_stars.fa b/test/jalview/io/test_fasta_stars.fa new file mode 100644 index 0000000..4595283 --- /dev/null +++ b/test/jalview/io/test_fasta_stars.fa @@ -0,0 +1,8 @@ +>a +asdafoobar +asdafoobar +asdafoobar* +>a +asdafoobar +asdafoobar +asdafoobar* \ No newline at end of file diff --git a/test/jalview/io/test_fasta_stars2.fa b/test/jalview/io/test_fasta_stars2.fa new file mode 100644 index 0000000..946b9d4 --- /dev/null +++ b/test/jalview/io/test_fasta_stars2.fa @@ -0,0 +1,4 @@ +>a +asda*foobar* +asda*foobar* +asda*foobar* -- 1.7.10.2