root/lang/perl/Helper-Simple/trunk/t/01-helper-separate-files.t @ 21702

Revision 21702, 2.6 kB (checked in by ktat, 5 years ago)

remove not needed files
download function is added(part of old copy function)
copy function is changed

now copy is to create entry to files
local file(s) are stored as zipped data

add camelize_children function

Line 
1use Cwd qw/getcwd/;
2
3BEGIN {
4      use lib qw(./lib ./t/lib);
5}
6
7use MyHelper;
8use Test::Base qw/no_plan/;
9
10filters({
11        i => ['eval'],
12        o => ['eval'],
13        }
14);
15
16run_compare i => 'o';
17
18__END__
19=== var
20--- i
21package MyHelper::Tmpl;
22var
23--- o
24{
25  hoge => 'MyHelper',
26  var  => 'in MyHelper',
27}
28=== my_var
29--- i
30package MyHelper::Tmpl;
31my_var;
32--- o
33{
34  fuga => 'MyHelper::Tmpl',
35  var  => 'test',
36}
37=== var
38--- i
39package MyHelper::Tmpl::Admin;
40var
41--- o
42{
43  hoge => 'MyHelper',
44  fuga => 'MyHelper::Tmpl::Admin',
45  var  => 'in MyHelper',
46}
47=== my_var
48--- i
49package MyHelper::Tmpl::Admin;
50my_var
51--- o
52{
53  admin  => 1,
54}
55=== camelize default
56--- i
57package MyHelper;
58$_ = camelize
59--- o
600
61=== normalize default
62--- i
63package MyHelper;
64$_ = normalize
65--- o
661
67=== camelize specified
68--- i
69package MyHelper::Doc::CameLize;
70$_ = camelize
71--- o
721
73=== normalize specified
74--- i
75package MyHelper::Doc::CameLize;
76$_ = normalize
77--- o
780
79=== inherited inherited
80--- i
81package MyHelper::Doc::CameLize::CaMeLiZe;
82$_ = camelize
83--- o
841
85=== inherited inherited
86--- i
87package MyHelper::Doc::CameLize::CaMeLiZe;
88$_ = normalize
89--- o
900
91=== template_tags
92--- i
93package MyHelper;
94template_tags
95--- o
96{
97  '.tt'  => '[% TAGS star - %]',
98  '.tt2' => '[% TAGS star - %]',
99  '.zip' => '',
100  '.gz'  => '',
101}
102=== template_tags
103--- i
104package MyHelper::Js;
105template_tags
106--- o
107{
108  '.tt'  => '[% TAGS star - %]',
109  '.tt2' => '[% TAGS star - %]',
110  '.zip' => '',
111  '.gz'  => '',
112}
113=== template_option
114--- i
115package MyHelper;
116template_option
117--- o
118{}
119=== template_option in sub module
120--- i
121package MyHelper::Js;
122template_option
123--- o
124{}
125=== here
126--- i
127package MyHelper;
128ref here;
129--- o
130'MyHelper'
131=== here
132--- i
133package MyHelper::Tmpl;
134ref here;
135--- o
136'MyHelper::Tmpl'
137=== default_var
138--- i
139package MyHelper;
140default_var;
141--- o
142use Config;
143{
144  appname    => 'myhelper',
145  root_class => 'MyHelper',
146  startperl  => $Config{startperl},
147}
148=== default_var in sub module
149--- i
150package MyHelper::Tmpl;
151default_var;
152--- o
153{
154  appname    => 'myhelper',
155  root_class => 'MyHelper',
156  startperl  => $Config{startperl},
157}
158=== pkg
159--- i
160package MyHelper;
161ref here->pkg('MyHelper::Js')
162--- o
163'MyHelper::Js'
164=== dir Doc::CameLize
165--- i
166package MyHelper::Doc::CameLize;
167here->dir =~ m{.+(doc/.+$)};
168$1;
169--- o
170'doc/CameLize/'
171=== dir Doc::CameLize::CaMeLiZe
172--- i
173package MyHelper::Doc::CameLize::CaMeLiZe;
174here->dir =~ m{.+(doc/.+$)};
175$1;
176--- o
177'doc/CameLize/CaMeLiZe/'
178=== dir DocCamel
179--- i
180package MyHelper::DocCamel;
181here->dir =~ m{.+(doccamel/$)};
182$1;
183--- o
184'doccamel/'
185=== dir doc
186--- i
187package MyHelper::Doc;
188here->dir =~ m{.+(doc/$)};
189$1;
190--- o
191'doc/'
192
Note: See TracBrowser for help on using the browser.