2 #include "parser-test.h"
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
5 if [ -s $prefix/grubenv ]; then
8 if [ "${next_entry}" ] ; then
9 set default="${next_entry}"
14 set default="${saved_entry}"
16 menuentry 'test saved option' {
23 void run_test(struct parser_test *test)
25 struct discover_boot_option *opt;
26 struct discover_context *ctx;
28 test_add_file_string(test, test->ctx->device,
30 "# GRUB Environment Block\n"
31 "saved_entry=test saved option\n"
32 "#############################");
34 test_read_conf_embedded(test, "/boot/grub/grub.cfg");
36 test_run_parser(test, "grub2");
40 check_boot_option_count(ctx, 1);
41 opt = get_boot_option(ctx, 0);
43 check_name(opt, "test saved option");
44 check_resolved_local_resource(opt->boot_image, ctx->device,
46 check_is_default(opt);