added unit test for hex code escaping

This commit is contained in:
Sxtanna 2020-07-23 12:02:04 -04:00
parent d63d7dc5f8
commit 21ca434e72

View File

@ -64,4 +64,12 @@ public final class ReplacerUnitTester
assertEquals(text, Values.CHARS_REPLACER.apply(text, null, Values.PLACEHOLDERS::get)); assertEquals(text, Values.CHARS_REPLACER.apply(text, null, Values.PLACEHOLDERS::get));
} }
@Test
void testCharsReplacerHandlesEscapedHex()
{
final String text = "\\&xFFFFFFThis should not change.";
assertEquals(text.substring(1), Values.CHARS_REPLACER.apply(text, null, Values.PLACEHOLDERS::get));
}
} }