# Test that 'def' bundle in a non-default namespace works

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

body file control
{
        namespace => "my_ns";
}

bundle common def
{
  vars:
      "some_var" string => "some value";
}

body file control
{
        namespace => "default";
}

bundle agent init
{
}

bundle agent test
{
}

bundle agent check
{
  classes:
      "ok" expression => strcmp("$(my_ns:def.some_var)", "some value");

  reports:
    ok::
      "$(this.promise_filename) Pass";
    !ok.DEBUG::
      "my_ns:def.some_var: $(my_ns:def.some_var)";
    !ok::
      "$(this.promise_filename) FAIL";
}
