JAL-3178 output nonpositional features in 'not positional' groups
[jalview.git] / test / jalview / io / FeaturesFileTest.java
index 77c18db..e47bd43 100644 (file)
@@ -451,7 +451,9 @@ public class FeaturesFileTest
             + "Iron\tFER_CAPAA\t-1\t39\t39\tMETAL\n"
             + "Turn\tFER_CAPAA\t-1\t36\t38\tGAMMA-TURN\n"
             + "<html>Pfam domain<a href=\"http://pfam.xfam.org/family/PF00111\">Pfam_3_4</a></html>\tFER_CAPAA\t-1\t20\t20\tPfam\n"
-            + "ENDGROUP\tuniprot\n";
+            + "ENDGROUP\tuniprot\n" + "STARTGROUP\tfoobar\n"
+            + "Foo\tFER_CAPAN\t-1\t0\t0\tBar\n" // non-positional feature
+            + "ENDGROUP\tfoobar\n";
     FeaturesFile featuresFile = new FeaturesFile(features,
             DataSourceType.PASTE);
     featuresFile.parse(al.getDataset(), colours, false);
@@ -486,7 +488,9 @@ public class FeaturesFileTest
     fr.setGroupVisibility("uniprot", true);
     exported = featuresFile.printJalviewFormat(al.getSequencesArray(), fr,
             true);
-    expected = "\nSTARTGROUP\tuniprot\n"
+    expected = "\nSTARTGROUP\tfoobar\n"
+            + "Foo\tFER_CAPAN\t-1\t0\t0\tBar\t0.0\n"
+            + "ENDGROUP\tfoobar\n" + "\nSTARTGROUP\tuniprot\n"
             + "Cath\tFER_CAPAA\t-1\t0\t0\tDomain\t0.0\n"
             + "ENDGROUP\tuniprot\n\n"
             + "desc1\tFER_CAPAN\t-1\t0\t0\tPfam\t1.3\n\n"
@@ -543,12 +547,16 @@ public class FeaturesFileTest
     assertEquals(expected, exported);
 
     /*
-     * include non-positional (overrides group not shown)
+     * include non-positional (overrides group not shown);
+     * uniprot non-positional (but not positional) 
+     * features should be exported
      */
     exported = featuresFile.printJalviewFormat(al.getSequencesArray(), fr,
             true);
     expected = "METAL\tcc9900\n" + "Pfam\tff0000\n"
             + "GAMMA-TURN\tscore|ff0000|00ffff|noValueMin|20.0|95.0|below|66.0\n"
+            + "\nSTARTGROUP\tfoobar\n"
+            + "Foo\tFER_CAPAN\t-1\t0\t0\tBar\t0.0\n" + "ENDGROUP\tfoobar\n"
             + "\nSTARTGROUP\tuniprot\n"
             + "Cath\tFER_CAPAA\t-1\t0\t0\tDomain\t0.0\n"
             + "ENDGROUP\tuniprot\n"