New test: cmdline and cat.
This commit is contained in:
parent
16f7c8f6d3
commit
0e7b2e3217
8 changed files with 180 additions and 26 deletions
|
@ -22,6 +22,7 @@
|
|||
#include <grub/video.h>
|
||||
#include <grub/lib/crc.h>
|
||||
#include <grub/mm.h>
|
||||
#include <grub/term.h>
|
||||
|
||||
GRUB_MOD_LICENSE ("GPLv3+");
|
||||
|
||||
|
@ -759,3 +760,42 @@ grub_video_checksum_end (void)
|
|||
ctr = 0;
|
||||
grub_video_capture_refresh_cb = 0;
|
||||
}
|
||||
|
||||
static struct grub_term_output *saved_outputs;
|
||||
static struct grub_term_output *saved_gfxnext;
|
||||
static struct grub_term_output *gfxterm;
|
||||
|
||||
int
|
||||
grub_test_use_gfxterm (void)
|
||||
{
|
||||
saved_outputs = grub_term_outputs;
|
||||
|
||||
FOR_ACTIVE_TERM_OUTPUTS (gfxterm)
|
||||
if (grub_strcmp (gfxterm->name, "gfxterm") == 0)
|
||||
break;
|
||||
if (!gfxterm)
|
||||
FOR_DISABLED_TERM_OUTPUTS (gfxterm)
|
||||
if (grub_strcmp (gfxterm->name, "gfxterm") == 0)
|
||||
break;
|
||||
|
||||
if (!gfxterm)
|
||||
{
|
||||
grub_test_assert (0, "terminal `%s' isn't found", "gfxterm");
|
||||
return 1;
|
||||
}
|
||||
|
||||
saved_gfxnext = gfxterm->next;
|
||||
grub_term_outputs = gfxterm;
|
||||
gfxterm->next = 0;
|
||||
gfxterm->init (gfxterm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
grub_test_use_gfxterm_end (void)
|
||||
{
|
||||
gfxterm->fini (gfxterm);
|
||||
gfxterm->next = saved_gfxnext;
|
||||
grub_term_outputs = saved_outputs;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue