mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-11-04 08:59:47 +01:00
Add newline splitter test
This commit is contained in:
parent
9a40df5bd8
commit
cac6c0ef35
@ -9,6 +9,17 @@ import java.util.Arrays;
|
|||||||
* Created by libraryaddict on 25/10/2018.
|
* Created by libraryaddict on 25/10/2018.
|
||||||
*/
|
*/
|
||||||
public class DisguiseUtilitiesTest {
|
public class DisguiseUtilitiesTest {
|
||||||
|
@Test
|
||||||
|
public void testNewlineSplitter() {
|
||||||
|
Assert.assertArrayEquals(new String[]{"Name 1", "Name 2"}, DisguiseUtilities.splitNewLine("Name 1\nName 2"));
|
||||||
|
Assert.assertArrayEquals(new String[]{"Name 1", "Name 2"}, DisguiseUtilities.splitNewLine("Name 1\\nName 2"));
|
||||||
|
Assert.assertArrayEquals(new String[]{"Name 1\\", "Name 2"},
|
||||||
|
DisguiseUtilities.splitNewLine("Name 1\\\nName 2"));
|
||||||
|
Assert.assertArrayEquals(new String[]{"Name 1\\nName 2"}, DisguiseUtilities.splitNewLine("Name 1\\\\nName 2"));
|
||||||
|
Assert.assertArrayEquals(new String[]{"Name 1\\","Name 2"}, DisguiseUtilities.splitNewLine("Name 1\\\\\\nName 2"));
|
||||||
|
Assert.assertArrayEquals(new String[]{"Name 1\\\\nName 2"}, DisguiseUtilities.splitNewLine("Name 1\\\\\\\\nName 2"));
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testQuoteSplitter() {
|
public void testQuoteSplitter() {
|
||||||
// Test if splits are correct
|
// Test if splits are correct
|
||||||
|
Loading…
Reference in New Issue
Block a user