blob: ffce853a260f265adfb8b81462aad8c28679d4ea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* check for multiple styles of option parsing for the 'search' command */
#include "parser-test.h"
#if 0 /* PARSER_EMBEDDED_CONFIG */
# no --set arugment will set the 'root' var
search a
search --set=v1 b
search --set v2 c
menuentry $root$v1$v2 {
linux /vmlinux
}
#endif
void run_test(struct parser_test *test)
{
struct discover_boot_option *opt;
struct discover_context *ctx;
ctx = test->ctx;
test_read_conf_embedded(test, "/grub/grub.cfg");
test_run_parser(test, "grub2");
check_boot_option_count(ctx, 1);
opt = get_boot_option(ctx, 0);
check_name(opt, "abc");
}
|