chat component rendering: test multiple blank lines

This commit is contained in:
Bixilon 2023-06-24 14:44:58 +02:00
parent 25eeb77a05
commit 334939b8b5
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -464,5 +464,16 @@ class ChatComponentRendererTest {
))
}
// TODO: shadow, formatting (just basic, that is code point renderer's job)
fun `first lines blank`() {
val text = TextComponent("\n\nbcd")
val info = render(text)
info.assert(lineIndex = 2, size = Vec2(5.0f, 33.0f), lines = listOf(
LineRenderInfo(BaseComponent(), 0.0f),
LineRenderInfo(BaseComponent(), 0.0f),
LineRenderInfo(BaseComponent(TextComponent("bcd")), 5.0f),
))
}
// TODO: shadow, formatting (italic; strikethrough; underlined)
}