This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Move CGI.pm from lib to ext
[perl5.git] / ext / CGI / t / user_agent.t
CommitLineData
68a4c8b9
DM
1# Test the user_agent method.
2use lib 't/lib';
3use Test::More 'no_plan';
4use CGI;
5
6my $q = CGI->new;
7
8is($q->user_agent, undef, 'user_agent: undef test');
9
10$ENV{HTTP_USER_AGENT} = 'mark';
11is($q->user_agent, 'mark', 'user_agent: basic test');
12ok($q->user_agent('ma.*'), 'user_agent: positive regex test');
13ok(!$q->user_agent('BOOM.*'), 'user_agent: negative regex test');
14
15