X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=test%2Fparser%2Ftest-grub2-sles-btrfs-snapshot.c;fp=test%2Fparser%2Ftest-grub2-sles-btrfs-snapshot.c;h=5fbbbe166361282ebc593ec9ace329a454096fd2;hp=0000000000000000000000000000000000000000;hb=ba1633025d93d7b41bda9bd32fa1d2337c7c4365;hpb=00a881a1adb6f656049939adecb9bf9edd29a658 diff --git a/test/parser/test-grub2-sles-btrfs-snapshot.c b/test/parser/test-grub2-sles-btrfs-snapshot.c new file mode 100644 index 0000000..5fbbbe1 --- /dev/null +++ b/test/parser/test-grub2-sles-btrfs-snapshot.c @@ -0,0 +1,27 @@ + +#include "parser-test.h" + +#if 0 /* PARSER_EMBEDDED_CONFIG */ +if [ -n "$extra_cmdline" ]; then + submenu "Bootable snapshot #$snapshot_num" { + menuentry "If OK, run 'snapper rollback $snapshot_num' and reboot." { true; } + } +fi +menuentry test { linux /vmlinux } +#endif + +void run_test(struct parser_test *test) +{ + struct discover_boot_option *opt; + struct discover_context *ctx; + + test_read_conf_embedded(test, "/grub2/grub.cfg"); + + test_run_parser(test, "grub2"); + + ctx = test->ctx; + + check_boot_option_count(ctx, 1); + opt = get_boot_option(ctx, 0); + check_name(opt, "test"); +}