# Test that variables can be passed across bundles and namespaces

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

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

bundle agent test
{
  methods:
      "namespaced" usebundle => ns109:pass($(init.dummy));
}

bundle agent check
{
  classes:
      "ok" expression => strcmp("$(init.dummy)", "$(ns109:pass.passed_dummy)");

  reports:
    DEBUG::
      "We passed '$(init.dummy)' to ns109:pass() and it recorded '$(ns109:pass.passed_dummy)'";
    ok::
      "$(this.promise_filename) Pass";
    !ok::
      "$(this.promise_filename) FAIL";
}
