Commit 5392a2f4 by ibaker Committed by Oliver Woodman

Add non-ascii characters to SpannedToHtmlConverterTest

These are handled by converting to ampersand codes - add a test to show
that's explicit & deliberate.

PiperOrigin-RevId: 304163712
parent 6570d12c
......@@ -147,6 +147,16 @@ public class SpannedToHtmlConverterTest {
}
@Test
public void convert_convertsNonAsciiCharactersToAmpersandCodes() {
String html =
SpannedToHtmlConverter.convert(
new SpannableString("Strìng with 優しいの non-ASCII characters"));
assertThat(html)
.isEqualTo("Strìng with 優しいの non-ASCII characters");
}
@Test
public void convert_ignoresUnrecognisedSpan() {
SpannableString spanned = new SpannableString("String with unrecognised span");
spanned.setSpan(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment