body file control
{
  inputs => { "$(sys.policy_entry_dirname)/../common.cf.sub" };
}

bundle common testcase
{
  vars:
    "filename" string => "$(this.promise_filename)";
}

body link_from link_info(source)
{
  source => "$(source)";
  link_type => "symlink";
}

bundle agent setup
{
  files:
    "$(G.testdir)/foo"
      create => "true",
      comment => "A regular file";

    "$(G.testdir)/bar"
      create => "true",
      comment => "A regular file symlink target";

    "$(G.testdir)/baz"
      link_from => link_info("$(G.testdir)/bar"),
      comment => "A symbolic link to a regular file";

    "$(G.testdir)/foobar/."
      create => "true",
      comment => "A directory";
}

bundle agent main
{
  files:
      "$(G.testdir)/foo"
        perms => m(777);

      "$(G.testdir)/baz"
        perms => m(777);

      "$(G.testdir)/foobar"
        perms => m(777);
}
