# Test that wrong bundle type is detected (Redmine #XXXX)
body common control
{
  inputs => { "../../default.sub.cf" };
  bundlesequence => { default("$(this.promise_filename)") };
  version => "1.0";
}

bundle agent init
{
  vars:
    "dummy" string => "dummy";
}

bundle agent test
{
  vars:
    "subout"
      string => execresult(
        "${sys.cf_agent} -Kf $(this.promise_dirname)/wrong-bundle-type.sub.x.cf",
        "noshell"
      );
}

bundle agent check
{
  classes:
    "ok" expression => regcmp(".*Unknown bundle type.*", "${test.subout}");

  reports:
    DEBUG::
      "$(test.subout)";

    ok::
      "$(this.promise_filename) Pass";

    !ok::
      "$(this.promise_filename) FAIL";
}
