--- /dev/null
+package jalview.bin;
+
+import static org.testng.AssertJUnit.assertEquals;
+import static org.testng.AssertJUnit.assertNull;
+
+import java.util.Arrays;
+
+import org.testng.annotations.Test;
+
+
+public class JalviewLiteTest
+{
+
+ @Test(groups = "Functional")
+ public void testSeparatorListToArray()
+ {
+ assertNull(JalviewLite.separatorListToArray(null, "|"));
+ assertNull(JalviewLite.separatorListToArray("", "|"));
+ assertNull(JalviewLite.separatorListToArray("|", "|"));
+ assertNull(JalviewLite.separatorListToArray("abc", "abc"));
+
+ String [] array = JalviewLite.separatorListToArray("abc|def|ghi|", "|");
+ assertEquals(3, array.length);
+ assertEquals("abc", array[0]);
+ assertEquals("def", array[1]);
+ assertEquals("ghi", array[2]);
+
+ assertEquals("[abc]",
+ Arrays.toString(JalviewLite.separatorListToArray("abc|", "|")));
+ assertEquals("[abc]", Arrays.toString(JalviewLite.separatorListToArray(
+ "abcxy", "xy")));
+
+ // these fail:
+ // assertEquals("[abc]",
+ // Arrays.toString(JalviewLite.separatorListToArray("|abc", "|")));
+ // assertEquals("[abc]", Arrays.toString(JalviewLite.separatorListToArray(
+ // "abc|||", "|")));
+ }
+}