File Coverage

File:t/word_separator.t
Coverage:100.0%

linestmtbrancondsubtimecode
1
2
2
2
13819
4
5
use Test::Most;
2
2
2
2
645
2
7
use String::CamelSnakeKebab;
3
4
2
71328
my $separator = $String::CamelSnakeKebab::WORD_SEPARATOR_PATTERN;
5
6
2
19
my %tests = (
7    "foo bar"    => [qw/foo bar/],
8    "foo\n\tbar" => [qw/foo bar/],
9    "foo-bar"    => [qw/foo bar/],
10    "fooBar"     => [qw/foo Bar/],
11    "FooBar"     => [qw/Foo Bar/],
12    "foo_bar"    => [qw/foo bar/],
13    "FOO_BAR"    => [qw/FOO BAR/],
14    "foo1"       => [qw/foo1/],
15    "foo1bar"    => [qw/foo1bar/],
16    "foo1_bar"   => [qw/foo1 bar/],
17    "foo1Bar"    => [qw/foo1 Bar/],
18);
19
20
22
78
cmp_deeply [ split $separator, $_ ] => $tests{$_},
21    sprintf "%8s -> %s", $_, join " ", @{ $tests{$_} }
22
2
25
        for sort keys %tests;
23
24
25
2
11
done_testing;