File: sub.t

package info (click to toggle)
libtest-warnings-perl 0.038-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 472 kB
  • sloc: perl: 375; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 279 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
use strict;
use warnings;

use Test::More tests => 4;
use Test::Warnings ':all';

sub foo
{
    is(1, 1, 'passing test');

    had_no_warnings;

    warn 'this warning will cause a failure';

    had_no_warnings;    # failing test
}

foo;

# END will generate a failing test too