From 21ca434e72f8d7b1ee1163cf3fde5f8581558ed3 Mon Sep 17 00:00:00 2001 From: Sxtanna Date: Thu, 23 Jul 2020 12:02:04 -0400 Subject: [PATCH] added unit test for hex code escaping --- .../clip/placeholderapi/replacer/ReplacerUnitTester.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/test/java/me/clip/placeholderapi/replacer/ReplacerUnitTester.java b/src/test/java/me/clip/placeholderapi/replacer/ReplacerUnitTester.java index 03d9408..02ab33a 100644 --- a/src/test/java/me/clip/placeholderapi/replacer/ReplacerUnitTester.java +++ b/src/test/java/me/clip/placeholderapi/replacer/ReplacerUnitTester.java @@ -64,4 +64,12 @@ public final class ReplacerUnitTester 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)); + } + }