File: 03_invalid.t

package info (click to toggle)
libconfig-auto-perl 0.44-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 164 kB
  • sloc: perl: 397; makefile: 2
file content (25 lines) | stat: -rw-r--r-- 582 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
21
22
23
24
25
use strict;
use warnings;
use Test::More 'no_plan';

my $Class   = 'Config::Auto';
my $Method  = 'score';
my $Data    = <<'.';
[part one]
This: is garbage
.

use_ok( $Class );

{   my $obj = $Class->new( source => $Data );
    ok( $obj,                   "Object created" );
    isa_ok( $obj, $Class,       "   Object" );

    {   my $warnings = '';
        local $SIG{__WARN__} = sub { $warnings .= "@_" };

        my $rv = $obj->$Method;
        ok( scalar(keys %$rv),  "   Got return value from '$Method'" );
        is( $warnings, '',      "   No warnings recorded" );
    }
}