* grub-core/tests/cmdline_cat_test.c: Don't reload unifont if it's
already loaded. This saves memory needed for tests,
This commit is contained in:
parent
a284320e1e
commit
4bf703206d
3 changed files with 24 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
* grub-core/tests/cmdline_cat_test.c: Don't reload unifont if it's
|
||||
already loaded. This saves memory needed for tests,
|
||||
|
||||
2013-11-18 Vladimir Serbinenko <phcoder@gmail.com>
|
||||
|
||||
Fix handling of install lists.
|
||||
|
|
|
@ -66,17 +66,25 @@ struct grub_procfs_entry test_txt =
|
|||
.get_contents = get_test_txt
|
||||
};
|
||||
|
||||
#define FONT_NAME "Unknown Regular 16"
|
||||
|
||||
/* Functional test main method. */
|
||||
static void
|
||||
cmdline_cat_test (void)
|
||||
{
|
||||
unsigned i;
|
||||
grub_font_t font;
|
||||
|
||||
grub_dl_load ("gfxterm");
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
|
||||
if (grub_font_load ("unicode") == 0)
|
||||
font = grub_font_get (FONT_NAME);
|
||||
if (font && grub_strcmp (font->name, FONT_NAME) != 0)
|
||||
font = 0;
|
||||
if (!font)
|
||||
font = grub_font_load ("unicode");
|
||||
|
||||
if (!font)
|
||||
{
|
||||
grub_test_assert (0, "unicode font not found: %s", grub_errmsg);
|
||||
return;
|
||||
|
|
|
@ -91,12 +91,15 @@ struct
|
|||
{ "gfxterm_high", "menu_color_highlight", "blue/red" },
|
||||
};
|
||||
|
||||
#define FONT_NAME "Unknown Regular 16"
|
||||
|
||||
/* Functional test main method. */
|
||||
static void
|
||||
gfxterm_menu (void)
|
||||
{
|
||||
unsigned i, j;
|
||||
grub_font_t font;
|
||||
|
||||
grub_dl_load ("png");
|
||||
grub_dl_load ("gettext");
|
||||
grub_dl_load ("gfxterm");
|
||||
|
@ -105,7 +108,13 @@ gfxterm_menu (void)
|
|||
|
||||
grub_dl_load ("gfxmenu");
|
||||
|
||||
if (grub_font_load ("unicode") == 0)
|
||||
font = grub_font_get (FONT_NAME);
|
||||
if (font && grub_strcmp (font->name, FONT_NAME) != 0)
|
||||
font = 0;
|
||||
if (!font)
|
||||
font = grub_font_load ("unicode");
|
||||
|
||||
if (!font)
|
||||
{
|
||||
grub_test_assert (0, "unicode font not found: %s", grub_errmsg);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue