#######################################################
#
# Set a negative match class if a process does exist,
# and partial name match succeeds but we wanted zero found
#
#######################################################

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

#######################################################

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

#######################################################

bundle agent test
{
  processes:
      "-agent"
      process_count => test_no_such;
}

body process_count test_no_such
{
      in_range_define => { "none_found" };
      out_of_range_define => { "some_found" };
      match_range => irange(0,0);
}

#######################################################

bundle agent check
{
  classes:
      "ok" expression => "!none_found.some_found";

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

### PROJECT_ID: core
### CATEGORY_ID: 30
