File: bugs.t

package info (click to toggle)
libuniversal-can-perl 1.20140328-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 152 kB
  • sloc: perl: 326; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 545 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 Test::More 'no_plan';    # tests => 8;

BEGIN { use_ok( 'UNIVERSAL::can', 'can' ) }

# valid use of isa() as static method on undefined class
{
    my $warnings = '';
    local $SIG{__WARN__} = sub { $warnings .= shift };
    use warnings 'UNIVERSAL::can';

    {
      local $TODO = "UnloadedClass->can('can') fails until 5.17.2"
          if $] < 5.017002;
      ok( UnloadedClass->can('can'),
          'unloaded class should be able to can()' );
    }

    is( $warnings, '', '... and should not warn' );
}