]> git.ozlabs.org Git - petitboot/blob - test/parser/test-yaboot-default.c
test/parser: add 'partition' directive overriding test for yaboot conf file
[petitboot] / test / parser / test-yaboot-default.c
1 #include "parser-test.h"
2
3 #if 0 /* PARSER_EMBEDDED_CONFIG */
4 default=linux.2
5
6 image=/vmlinux
7         label=linux.1
8
9 image=/vmlinux
10         label=linux.2
11 #endif
12
13 void run_test(struct parser_test *test)
14 {
15         struct discover_boot_option *opt;
16         struct discover_context *ctx;
17
18         test_read_conf_embedded(test);
19         test_run_parser(test, "yaboot");
20
21         ctx = test->ctx;
22
23         check_boot_option_count(ctx, 2);
24
25         opt = get_boot_option(ctx, 1);
26         check_name(opt, "linux.2");
27         check_is_default(opt);
28 }