File: 01-fail-if-SYNOPSIS-has-errors.t

package info (click to toggle)
libtest-synopsis-perl 0.17-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 336 kB
  • sloc: perl: 200; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 620 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use Test::Builder::Tester tests => 1;
use Test::More;
use Test::Synopsis;

# Test whether we indeed can detect errors in SYNOPSIS codes

test_out('not ok 1 - t/lib/BrokenSYNOPSIS01.pm');
test_diag(q{  Failed test 't/lib/BrokenSYNOPSIS01.pm'},
    q{  at t/01-fail-if-SYNOPSIS-has-errors.t line } . line_num(+9) . q{.},
    q{Global symbol "$x" requires explicit package name}
     . ( ($^V and $^V gt 5.21.3)
            ? ' (did you forget to declare "my $x"?)'
            : ''
        )
     . q{ at t/lib/BrokenSYNOPSIS01.pm line 18.},
);
synopsis_ok("t/lib/BrokenSYNOPSIS01.pm");
test_test("synopsis fail works");