--- /dev/null
+package jalview.analysis;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+public class AlignSeqTest
+{
+ @Test
+ public void testExtractGaps()
+ {
+ assertNull(AlignSeq.extractGaps(null, null));
+ assertNull(AlignSeq.extractGaps(null, "ACG"));
+ assertNull(AlignSeq.extractGaps("-. ", null));
+
+ assertEquals(" AC-G.T", AlignSeq.extractGaps("", " AC-G.T"));
+ assertEquals("AC-G.T", AlignSeq.extractGaps(" ", " AC-G.T"));
+ assertEquals("ACG.T", AlignSeq.extractGaps(" -", " AC-G.T"));
+ assertEquals("ACGT", AlignSeq.extractGaps(" -.", " AC-G.T ."));
+ assertEquals(" ACG.T", AlignSeq.extractGaps("-", " AC-G.T"));
+ }
+}