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
This commit is contained in:
parent
6570d12c3c
commit
5392a2f4bc
@ -146,6 +146,16 @@ public class SpannedToHtmlConverterTest {
|
||||
assertThat(html).isEqualTo("String with <i><foo>unrecognised</foo></i> tags");
|
||||
}
|
||||
|
||||
@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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user