]> git.ozlabs.org Git - petitboot/blob - test/parser/test-grub2-if-formats.c
discover/grub2: Allow to separate the --id argument using a space char
[petitboot] / test / parser / test-grub2-if-formats.c
1
2 #include "parser-test.h"
3
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
5 if true;then t1=1;fi
6 if true ;then t2=2;fi
7 if true;then t3=3 ;fi
8 if true;then t4=4; ;fi
9 if true
10 then t5=5
11 fi
12 if true
13 then t6=6;
14 fi
15 if true
16  then t7=7
17 fi
18 if true
19 then t8=8; fi
20 if true
21 then
22 t9=9
23
24 fi
25
26 menuentry $t1$t2$t3$t4$t5$t6$t7$t8$t9 {linux /vmlinux}
27 #endif
28
29 void run_test(struct parser_test *test)
30 {
31         struct discover_boot_option *opt;
32
33         test_read_conf_embedded(test, "/grub2/grub.cfg");
34
35         test_run_parser(test, "grub2");
36
37         check_boot_option_count(test->ctx, 1);
38         opt = get_boot_option(test->ctx, 0);
39         check_name(opt, "123456789");
40 }