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

bundle agent init
{
}

bundle agent test
{
  vars:
    "bundles" slist => { "a", "b" };
    "values" slist => { "x", "y" };

  methods:
    "b" usebundle => $(bundles)("z");

    # runs 2x
    "bv" usebundle => $(bundles)($(values));

      # runs 4x
}

bundle agent a(var)
{
  classes:
    "a_$(var)"
      expression => "any",
      scope => "namespace";
}

bundle agent b(var)
{
  classes:
    "b_$(var)"
      expression => "any",
      scope => "namespace";
}

bundle agent check
{
  classes:
    "ok" and => { "a_x", "b_x", "a_y", "b_y", "a_z", "b_z" };

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

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