File: bad-autoloads.t

package info (click to toggle)
libtest-class-perl 0.35-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 476 kB
  • ctags: 102
  • sloc: perl: 1,668; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 508 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
20
21
22
23
#! /usr/bin/perl

use strict;
use warnings FATAL => 'all';
use Test::More;

BEGIN {
    no warnings;
    eval "use Contextual::Return";
    if ($@ ) {
        plan skip_all => "need Contextual::Return" if $@;
    } else {
        plan tests => 2;
        use_ok 'Test::Class';
    }
}

{
    our $is_warning_free = 1;
    $SIG{ __WARN__ } = sub { $is_warning_free = 0 };
    Test::Class->_isa_class( 'Contextual::Return::Value' );
    ok $is_warning_free, 'avoided warnings from Contextual::Return::Value';
}