File: test_script__import.t

package info (click to toggle)
libtest-script-perl 1.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 296 kB
  • sloc: perl: 426; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 558 bytes parent folder | download | duplicates (4)
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;