### ----------------------------------------------------
### -- Test::Async
### -- Licenses: Artistic-2.0
### -- Authors: Vadim Belman <vrurg@cpan.org>
### -- File: t/080-local-bundle.rakutest
### ----------------------------------------------------
use v6;

# Make sure we can declare local test-bundle for the purposes of current test-suite.
    use Test::Async::Decl;
    test-bundle MyLocalBundle {
        method test-local-tool is test-tool {
            self.pass: "locally declared bundle exports a test tool";
        }
    }

use Test::Async <Base>;

plan 2;

test-local-tool;

my @default-args = ('-I' ~ $?FILE.IO.parent(2)), '-MTest::Async';

is-run q:to/DECL_CODE/,
use Test::Async::Decl;
test-bundle AnotherBundle { }
role R { }
DECL_CODE
    "test-bundle doesn't break role declaration",
    :compiler-args(@default-args),
    :exitcode(0),
    :out(""),
    :err("");

done-testing;


