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

bundle agent init
{
}

bundle agent test
{
  files:
    "$(G.testfile)"
      file_type => "fifo",
      edit_line => init_insert("foo"),
      edit_defaults => init_empty;
}

bundle edit_line init_insert(str)
{
  insert_lines:
      "$(str)";
}

body edit_defaults init_empty
{
      empty_file_before_editing => "true";
}

bundle agent check
{
  classes:
    "exists" expression => fileexists("$(G.testfile)");
    "ok" not => "exists";

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