JAL-3529 test for AC <Uniprot/EMBL> rather than DR in Stockholm file
authorJim Procter <jprocter@issues.jalview.org>
Tue, 18 Feb 2020 18:37:39 +0000 (18:37 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 18 Feb 2020 18:37:39 +0000 (18:37 +0000)
test/jalview/io/StockholmFileTest.java

index a16aa07..85ccdcb 100644 (file)
@@ -114,7 +114,12 @@ public class StockholmFileTest
     String toStockholm = af.formatSequences(FileFormat.Stockholm,
             new Alignment(new SequenceI[]
             { sq }), false);
-    assertTrue(toStockholm.matches("AC\\s+P00224"),
+    System.out.println(toStockholm);
+    // bleh - java.util.Regex sucks
+    assertTrue(
+            Pattern.compile(".*\\s+AC\\s+P00224.*",
+                    java.util.regex.Pattern.DOTALL).matcher(toStockholm)
+                    .matches(),
             "Couldn't locate UNIPROT Accession in generated Stockholm file.");
     AlignmentI fromStockholm = af.readFile(toStockholm,
             DataSourceType.PASTE, FileFormat.Stockholm);