d0a50ed8af320a93a7669c4665fbe57045b08bd3
java/com.sap.sse.test/src/com/sap/sse/test/RegexTest.java
| ... | ... | @@ -5,6 +5,7 @@ import static org.junit.jupiter.api.Assertions.assertFalse; |
| 5 | 5 | import static org.junit.jupiter.api.Assertions.assertNull; |
| 6 | 6 | import static org.junit.jupiter.api.Assertions.assertTrue; |
| 7 | 7 | |
| 8 | +import java.util.Arrays; |
|
| 8 | 9 | import java.util.logging.Logger; |
| 9 | 10 | import java.util.regex.Matcher; |
| 10 | 11 | import java.util.regex.Pattern; |
| ... | ... | @@ -94,4 +95,11 @@ public class RegexTest { |
| 94 | 95 | final Matcher m1 = nationalityPattern.matcher(sb.toString()); |
| 95 | 96 | assertFalse(m1.matches()); |
| 96 | 97 | } |
| 98 | + |
|
| 99 | + @Test |
|
| 100 | + public void testExpeditionHeaderSplitting() { |
|
| 101 | + final String line = "a , b ,, c"; |
|
| 102 | + final String[] splitResult = line.split("\\s*,\\s*"); |
|
| 103 | + assertEquals(Arrays.asList("a", "b", "", "c"), Arrays.asList(splitResult)); |
|
| 104 | + } |
|
| 97 | 105 | } |