File: util.t

package info (click to toggle)
libhtml-formhandler-perl 0.40057-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,320 kB
  • ctags: 685
  • sloc: perl: 8,849; makefile: 2
file content (23 lines) | stat: -rw-r--r-- 540 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
use strict;
use warnings;
use Test::More;

use HTML::FormHandler::Render::Util ('ucc_widget', 'cc_widget');

my @cc = ('MyApp', 'myApp', 'My_App', 'MyLongerApp');
my @ucc = ('my_app', 'my_app', 'my_app', 'my_longer_app');
my @cc_ucc = ('MyApp', 'MyApp', 'MyApp', 'MyLongerApp');

my $index = 0;
foreach my $str ( @cc ) {
    is( ucc_widget($str), $ucc[$index], "$str uncamelcased ok" );
    $index++;
}

$index = 0;
foreach my $str ( @ucc ) {
    is( cc_widget($str), $cc_ucc[$index], "$str camelcased ok" );
    $index++;
}

done_testing;