X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=test%2Fjalview%2Fio%2FIdentifyFileTest.java;h=c00cf069e9e1015d29ba7b556d2a6e12128ceacc;hb=cd5e356825ef327ebf02b20c7ad5b22273aebe8b;hp=60f2e487ff5bb947a4055ab544f6e009f3b2f58f;hpb=b976bc1c78e95633d7e49dfcc817a42aed84ebec;p=jalview.git diff --git a/test/jalview/io/IdentifyFileTest.java b/test/jalview/io/IdentifyFileTest.java index 60f2e48..c00cf06 100644 --- a/test/jalview/io/IdentifyFileTest.java +++ b/test/jalview/io/IdentifyFileTest.java @@ -20,6 +20,7 @@ */ package jalview.io; +import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertFalse; import static org.testng.AssertJUnit.assertTrue; @@ -41,24 +42,34 @@ public class IdentifyFileTest } /** - * Additional tests for (a) Jalview features file with no colour - * specifications (old style 'groups' file) and (b) Jalview features file with - * embedded GFF + * Additional tests for Jalview features file */ @Test(groups = "Functional") public void testIdentify_featureFile() { IdentifyFile ider = new IdentifyFile(); - // Jalview format with features only, no feature colours + /* + * Jalview format with features only, no feature colours + */ String data = "Iron-sulfur (2Fe-2S)\tFER_CAPAA\t-1\t39\t39\tMETAL\n" + "Iron-phosphorus (2Fe-P)\tID_NOT_SPECIFIED\t2\t86\t87\tMETALLIC\n"; - Assert.assertEquals(IdentifyFile.FeaturesFile, ider.identify(data, AppletFormatAdapter.PASTE)); + assertEquals(IdentifyFile.FeaturesFile, + ider.identify(data, AppletFormatAdapter.PASTE)); - // Jalview feature colour followed by GFF format feature data + /* + * Jalview feature colour followed by GFF format feature data + */ data = "METAL\tcc9900\n" + "GFF\n" + "FER_CAPAA\tuniprot\tMETAL\t44\t45\t4.0\t.\t.\n"; - Assert.assertEquals(IdentifyFile.FeaturesFile, + assertEquals(IdentifyFile.FeaturesFile, + ider.identify(data, AppletFormatAdapter.PASTE)); + + /* + * Feature with '<' in the name (JAL-2098) + */ + data = "kD < 3\tred\n" + "Low kD\tFER_CAPAA\t-1\t39\t39\tkD < 3\n"; + assertEquals(IdentifyFile.FeaturesFile, ider.identify(data, AppletFormatAdapter.PASTE)); } @@ -82,6 +93,7 @@ public class IdentifyFileTest { "examples/exampleFeatures.txt", IdentifyFile.FeaturesFile }, { "examples/testdata/simpleGff3.gff", IdentifyFile.FeaturesFile }, { "examples/testdata/test.jvp", "Jalview" }, + { "examples/testdata/test.cif", "mmCIF" }, { "examples/testdata/cullpdb_pc25_res3.0_R0.3_d150729_chains9361.fasta.15316", "FASTA" },