TS_ASSERT_EQUALS(text.GetSize().Height, lineHeight + padding * 2);
}
- void test_regression_rP26522()
- {
- TS_ASSERT_OK(g_VFS->Mount(L"", DataDir() / "mods" / "mod" / "", VFS_MOUNT_MUST_EXIST));
-
- CGUI gui(g_ScriptContext);
-
- const CStrW font = L"sans-bold-13";
- CGUIString string;
- CGUIText text;
-
- // rP26522 introduced a bug that triggered in rare cases with word-wrapping.
- string.SetValue(L"90–120 min");
- text = CGUIText(gui, string, L"sans-bold-13", 53, 8.f, EAlign::LEFT, nullptr);
-
- TS_ASSERT_EQUALS(text.GetTextCalls().size(), 2);
- TS_ASSERT_EQUALS(text.GetSize().Height, 14 + 9 + 8 * 2);
- }
-
void test_multiple_blank_spaces()
{
CGUI gui(g_ScriptContext);