assertEquals("[hello\\world, jello'\\world', mello'wo\\'rld']",
Arrays.toString(StringUtils.separatorListToArray(
"hello\\world;jello'\\world';mello'wo\\'rld'", ";")));
+ // this next one checks that an escaped single quote doesn't end a quoted
+ // section so the following separator is treated as part of the quoted text,
+ // not as a separator.
+ assertEquals("[hello\\world, jello'\\world', mello'wo\\'r;ld']",
+ Arrays.toString(StringUtils.separatorListToArray(
+ "hello\\world;jello'\\world';mello'wo\\'r;ld'", ";")));
+ assertEquals("[hello\\;jello, mello\\;';'w, world]",
+ Arrays.toString(StringUtils.separatorListToArray(
+ "hello\\;jello;mello\\;';'w;world", ";")));
}
@Test(groups = { "Functional" })