# Reachable bundle tests verify that you are allowed have references
# to undefined bundles, as long as they are not actually called.

# These tests are left very simple on purpose,
# they are not using the test framework.
# They should be seen together, note that defined vs undefined variants are
# almost identical, just replacing one detail to show what should work
# and what should error.

bundle agent baz
{
  reports:
    "$(this.promise_filename) Pass";
}

bundle agent bar(x)
{
  methods:
    "$(x)"; # Tries to call baz, exists, works
}

bundle agent main
{
  methods:
    "foo"
      usebundle => bar("baz");
}
