From 0cc7012545b54289025e8c6f109b4f26dc61dae9 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Tue, 9 May 2017 17:58:52 +0100 Subject: [PATCH] =?utf8?q?JAL-2509=20verify=20stockholm=20parser=E2=80=99s=20?= =?utf8?q?bracket=20regex=20is=20working=20for=20all=20WUSS=20notation?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- test/jalview/io/StockholmFileTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/jalview/io/StockholmFileTest.java b/test/jalview/io/StockholmFileTest.java index bd1400b..f6b39af 100644 --- a/test/jalview/io/StockholmFileTest.java +++ b/test/jalview/io/StockholmFileTest.java @@ -461,6 +461,20 @@ public class StockholmFileTest roundTripSSForRNA(aliFile, annFileFullWuss); } + @Test(groups = { "Functional" }) + public void detectWussBrackets() + { + for (char ch : new char[] { '{', '}', '[', ']', '(', ')', '<', '>' }) + { + Assert.assertTrue(StockholmFile.DETECT_BRACKETS.matchAt("" + ch, 0), + "Didn't recognise " + ch + " as a WUSS bracket"); + } + for (char ch : new char[] { '@', '!', 'V', 'Q', '*', ' ', '-', '.' }) + { + Assert.assertFalse(StockholmFile.DETECT_BRACKETS.matchAt("" + ch, 0), + "Shouldn't recognise " + ch + " as a WUSS bracket"); + } + } private static void roundTripSSForRNA(String aliFile, String annFile) throws Exception { -- 1.7.10.2