# Test that variables can be passed across bundles and namespaces

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

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

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

bundle agent check
{
  classes:
      "ok" expression => strcmp("$(init.dummy)", "$(test.nsresult[dummy])");

  reports:
    DEBUG::
      "We passed '$(init.dummy)' to ns110:pass() and it returned '$(test.nsresult[dummy])'";
    ok::
      "$(this.promise_filename) Pass";
    !ok::
      "$(this.promise_filename) FAIL";
}
