From: Jim Procter Date: Tue, 18 Feb 2020 18:37:39 +0000 (+0000) Subject: JAL-3529 test for AC rather than DR in Stockholm file X-Git-Tag: Develop-2_11_2_0-d20201215~35^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=beaa6e0c46460e1ddcea461ffee16f5c4fccca08;p=jalview.git JAL-3529 test for AC rather than DR in Stockholm file --- diff --git a/test/jalview/io/StockholmFileTest.java b/test/jalview/io/StockholmFileTest.java index a16aa07..85ccdcb 100644 --- a/test/jalview/io/StockholmFileTest.java +++ b/test/jalview/io/StockholmFileTest.java @@ -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);