assertTrue("ISO control chars must be passed through", e.doit);
}
@Test
public void testPortsTextValidationListenerLogic() throws Exception {
PortsTextValidationListener listener = new PortsTextValidationListener();
assertFalse(listener.validateChar('-', "", 0));
assertFalse(listener.validateChar('-', "-", 0));
assertFalse(listener.validateChar('-', ",", 0));
assertFalse(listener.validateChar('\n', "", 0));
assertFalse(listener.validateChar(',', ",", 0));
assertFalse(listener.validateChar(',', "-", 0));
assertFalse(listener.validateChar(',', "12,3", 3));
assertTrue(listener.validateChar(',', "1234", 2));
assertTrue(listener.validateChar('-', "1234", 2));
assertTrue(listener.validateChar(' ', "123,", 4));
assertTrue(listener.validateChar('\n', "123,", 4));
assertTrue(listener.validateChar('7', "123,1-3,1-", 10));
assertTrue(listener.validateChar('3', "1, ", 4));
}