2 #include "parser-test.h"
4 #if 0 /* PARSER_EMBEDDED_CONFIG */
13 KERNEL /backup/vmlinuz
23 void run_test(struct parser_test *test)
25 struct discover_boot_option *opt;
26 struct discover_context *ctx;
28 test_read_conf_embedded(test, "/syslinux/syslinux.cfg");
30 test_run_parser(test, "syslinux");
34 check_boot_option_count(ctx, 3);
35 opt = get_boot_option(ctx, 2);
37 check_name(opt, "linux");
38 check_resolved_local_resource(opt->boot_image, ctx->device, "/vmlinuz");
39 check_is_default(opt);
40 check_args(opt, "console=ttyS0 console=tty0");
41 check_not_present_resource(opt->initrd);
43 opt = get_boot_option(ctx, 1);
45 check_name(opt, "backup");
46 check_resolved_local_resource(opt->boot_image, ctx->device, "/backup/vmlinuz");
47 check_args(opt, "console=ttyS0 root=/dev/sdb");
48 check_resolved_local_resource(opt->initrd, ctx->device, "/boot/initrd");
50 opt = get_boot_option(ctx, 0);
52 check_name(opt, "hyphen");
53 check_resolved_local_resource(opt->boot_image, ctx->device, "/test/vmlinuz");
55 check_not_present_resource(opt->initrd);