File: 10-no-done_testing.t

package info (click to toggle)
libtest-warnings-perl 0.016-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 352 kB
  • ctags: 8
  • sloc: perl: 339; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 402 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings FATAL => 'all';

use Test::More;

END {
    final_tests();
}

use Test::Warnings ':no_end_test';

warn 'this warning should not be caught';

pass 'a passing test to keep done_testing happy';

done_testing;

# this is run in the END block
sub final_tests
{
    # if there was anything else than 1 test run, then we will fail
    exit (Test::Builder->new->current_test <=> 1);
}