body common control
{
  inputs => { "../../default.sub.cf" };
  bundlesequence => { default("$(this.promise_filename)") };
  version => "1.0";
}


bundle agent test
{
  vars:
    "release_id_list" slist => variablesmatching("default:sys.policy_release_id");
    "escaped" string => escape("$(sys.policy_entry_dirname)");
    "release_id_regex" string => "^$(escaped)\/(bootstrap|failsafe|\(null\)|[A-Fa-f0-9]+)?$";

  classes:
    "var_ok" expression => strcmp("$(release_id_list)", "default:sys.policy_release_id");
    "reg_ok" expression => regcmp("$(release_id_regex)", "$(sys.policy_release_id)");
    "ok" expression => and("var_ok", "reg_ok");

  reports:
    DEBUG::
      "Found: $(release_id_list), Correct: $(sys.policy_release_id)";
    DEBUG.var_ok::
      "var ok";
    DEBUG.reg_ok::
      "reg_ok";
    ok::
      "$(this.promise_filename) Pass";
    !ok::
      "$(this.promise_filename) FAIL";
}
