root/Template-Plugin-MobileAgent/trunk/t/01_plugin.t

Revision 793 (checked in by miyagawa, 17 years ago)

Initial revision

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1 use strict;
2 use Template::Test;
3
4 $ENV{HTTP_USER_AGENT} = "J-PHONE/2.0/J-DN02";
5
6 test_expect(\*DATA);
7
8 __END__
9 -- test --
10 [%- USE agent = MobileAgent('DoCoMo/1.0/F504i/c10/TB') -%]
11 [% IF agent.is_docomo -%]
12 DoCoMo
13 [% ELSE %]
14 not DoCoMo
15 [% END -%]
16 -- expect --
17 DoCoMo
18
19 -- test --
20 [%- USE MobileAgent -%]
21 [% MobileAgent.name %]
22 -- expect --
23 J-PHONE
24
Note: See TracBrowser for help on using the browser.