]> git.ozlabs.org Git - petitboot/blob - test/parser/test-grub2-implicit-default-unset.c
discover: Release process resources on error
[petitboot] / test / parser / test-grub2-implicit-default-unset.c
1
2 #include "parser-test.h"
3
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
5 menuentry 'test.1' {
6         linux   /vmlinux
7 }
8 menuentry 'test.2' {
9         linux   /vmlinux
10 }
11 #endif
12
13 void run_test(struct parser_test *test)
14 {
15         struct discover_boot_option *opt;
16
17         test_read_conf_embedded(test, "/grub2/grub.cfg");
18         test_run_parser(test, "grub2");
19
20         check_boot_option_count(test->ctx, 2);
21         opt = get_boot_option(test->ctx, 0);
22
23         check_name(opt, "test.1");
24         check_is_default(opt);
25 }