| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
use Test::More; |
| 4 |
|
| 5 |
use HTML::FormHandler::Render::Util ('ucc_widget', 'cc_widget'); |
| 6 |
|
| 7 |
my @cc = ('MyApp', 'myApp', 'My_App', 'MyLongerApp'); |
| 8 |
my @ucc = ('my_app', 'my_app', 'my_app', 'my_longer_app'); |
| 9 |
my @cc_ucc = ('MyApp', 'MyApp', 'MyApp', 'MyLongerApp'); |
| 10 |
|
| 11 |
my $index = 0; |
| 12 |
foreach my $str ( @cc ) { |
| 13 |
is( ucc_widget($str), $ucc[$index], "$str uncamelcased ok" ); |
| 14 |
$index++; |
| 15 |
} |
| 16 |
|
| 17 |
$index = 0; |
| 18 |
foreach my $str ( @ucc ) { |
| 19 |
is( cc_widget($str), $cc_ucc[$index], "$str camelcased ok" ); |
| 20 |
$index++; |
| 21 |
} |
| 22 |
|
| 23 |
done_testing; |