OTRS-OPM-Validate

 view release on metacpan or  search on metacpan

t/001_base.t  view on Meta::CPAN

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
    good => [
        _get_files('good')
    ],
    bad  => [
        _get_files('bad')
    ]
);
 
for my $type ( sort keys %opms ) {
    for my $file ( @{ $opms{$type} || [] } ) {
        my $content = do { local ( @ARGV, $/ ) = $file; <> };
        my $success = eval {
            OTRS::OPM::Validate->validate( $content );
            1;
        };
 
        is $@, '', 'no errors for ' . $file if $type eq 'good';
        ok( ($type eq 'good' ? $success : !$success), $file );
    }
}



( run in 0.273 second using v1.01-cache-2.11-cpan-55f5a4728d2 )