root/lang/perl/HTTP-MobileAttribute/trunk/t/01_carrier_detect.t @ 8634

Revision 8634, 0.7 kB (checked in by tokuhirom, 7 years ago)

キャリヤ判別まわりは別モジュールにわける意味やっぱないわ。そして、Class::Component に依存させる意味もないわ。

Line 
1use strict;
2use warnings;
3use Test::Base;
4use HTTP::MobileAttribute;
5HTTP::MobileAttribute->load_plugins(qw/CarrierName/);
6
7plan tests => 1*blocks;
8
9filters {
10    input    => [qw/get_carrier/],
11};
12
13sub get_carrier {
14    my $ua = shift;
15    HTTP::MobileAttribute->new($ua)->carrier_long_name;
16}
17
18run_is input => 'expected';
19
20__END__
21
22===
23--- input: DoCoMo/1.0/NM502i
24--- expected: DoCoMo
25
26===
27--- input: J-PHONE/5.0/V801SA
28--- expected: JPhone
29
30===
31--- input: KDDI-TS21 UP.Browser/6.0.2.276 (GUI) MMP/1.1
32--- expected: EZweb
33
34===
35--- input: Mozilla/2.0 (compatible; Ask Jeeves)
36--- expected: NonMobile
37
38===
39--- input: Mozilla/3.0(DDIPOCKET;JRC/AH-J3001V,AH-J3002V/1.0/0100/c50)CNF/2.0
40--- expected: AirHPhone
41
Note: See TracBrowser for help on using the browser.