X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=generator%2Fgenerator_capitests.ml;h=b41e2889494d6c91c69cbd2a50ebff6a4468dfef;hb=f2460699ab7f972b1981d072164a04820c52b0c6;hp=594c8676e734bbcde3be7b6b859a01948615c104;hpb=ff38fea645e69e8f4d84f2691dac3116d9bac1c4;p=libguestfs.git diff --git a/generator/generator_capitests.ml b/generator/generator_capitests.ml index 594c867..b41e288 100644 --- a/generator/generator_capitests.ml +++ b/generator/generator_capitests.ml @@ -720,6 +720,13 @@ and generate_test_command_call ?(expect_error = false) ?test test_name cmd = with Not_found -> failwithf "%s: in test, command %s was not found" test_name name in + (* If the call has optional args, fold them all together. We cannot + * test partial optional args yet. + *) + let style = + let ret, args, optargs = style in + ret, args@optargs in + if List.length (snd style) <> List.length args then failwithf "%s: in test, wrong number of args given to %s" test_name name;