1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
|
use Test2::V0 -no_srand => 1;
use Test::Script ();
is(
intercept { Test::Script->import(tests => 42) },
array {
event Plan => sub {
call directive => '';
call max => 42;
};
},
'with tests',
);
is(
intercept { Test::Script->import(skip_all => 'foo') },
array {
event Plan => sub {
call directive => 'SKIP';
call reason => 'foo';
};
},
'with skip',
);
is(
intercept { Test::Script->import('no_plan'); done_testing },
array {
event Plan => sub {
};
},
'with no plan',
);
done_testing;
|