aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com')
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index a728ac2b..d61725e6 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -2693,4 +2693,11 @@ public class ServerTests {
.with(httpBasic(ugnichName, ugnichPassword)))
.andExpect(status().isBadRequest());
}
+ @Test
+ public void textTruncationShouldNotBreakEmojis() {
+ var text = "Так ты же написал, чтоб я сам поправил отступ \uD83D\uDE00\n";
+ var expected = "Так ты же написал, чтоб я сам поправил отступ";
+ var truncated = PlainTextFormatter.truncateText(text, 47);
+ assertThat(truncated, is(expected));
+ }
}