File: 99-warnings.t

package info (click to toggle)
libhttp-browserdetect-perl 3.41-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,220 kB
  • sloc: perl: 3,083; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 658 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env perl

use strict;
use warnings;

use HTTP::BrowserDetect ();
use Test::Warnings;
use Test::More import => [qw( done_testing is ok subtest )];

ok( my $ua = HTTP::BrowserDetect->new(undef), 'undef produces no warnings' );

subtest 'no warnings on fake MSIE' => sub {
    my $ua = HTTP::BrowserDetect->new(
        'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/F3E)');
    is( $ua->engine_version, undef, 'undef browser_version' );
    is( $ua->engine_major,   undef, 'undef engine_major' );
    is( $ua->engine_minor,   undef, 'undef engine_minor' );
    is( $ua->engine_beta,    undef, 'undef engine_beta' );
};

done_testing();