Login
Update release date of P::C 1.072 in Changes.
[gknop/Perl-Critic.git] / t / RegularExpressions / RequireExtendedFormatting.run
CommitLineData
196197a1
AL
1## name baisc passes
2## failures 0
3## cut
4my $string =~ m{pattern}x;
5my $string =~ m{pattern}gimx;
6my $string =~ m{pattern}gixs;
7my $string =~ m{pattern}xgms;
8
9my $string =~ m/pattern/x;
10my $string =~ m/pattern/gimx;
11my $string =~ m/pattern/gixs;
12my $string =~ m/pattern/xgms;
13
14my $string =~ /pattern/x;
15my $string =~ /pattern/gimx;
16my $string =~ /pattern/gixs;
17my $string =~ /pattern/xgms;
18
19my $string =~ s/pattern/foo/x;
20my $string =~ s/pattern/foo/gimx;
21my $string =~ s/pattern/foo/gixs;
22my $string =~ s/pattern/foo/xgms;
23
24#-----------------------------------------------------------------------------
25
26## name basic failures
27## failures 16
28## cut
29my $string =~ m{pattern};
30my $string =~ m{pattern}gim;
31my $string =~ m{pattern}gis;
32my $string =~ m{pattern}gms;
33
34my $string =~ m/pattern/;
35my $string =~ m/pattern/gim;
36my $string =~ m/pattern/gis;
37my $string =~ m/pattern/gms;
38
39my $string =~ /pattern/;
40my $string =~ /pattern/gim;
41my $string =~ /pattern/gis;
42my $string =~ /pattern/gms;
43
44my $string =~ s/pattern/foo/;
45my $string =~ s/pattern/foo/gim;
46my $string =~ s/pattern/foo/gis;
47my $string =~ s/pattern/foo/gms;
48
df95b6a2
AL
49#-----------------------------------------------------------------------------
50
51## name tr and y formatting
52## failures 0
53## cut
54
55my $string =~ tr/[A-Z]/[a-z]/;
56my $string =~ tr|[A-Z]|[a-z]|;
57my $string =~ tr{[A-Z]}{[a-z]};
58
59my $string =~ y/[A-Z]/[a-z]/;
60my $string =~ y|[A-Z]|[a-z]|;
61my $string =~ y{[A-Z]}{[a-z]};
62
63my $string =~ tr/[A-Z]/[a-z]/cds;
64my $string =~ y/[A-Z]/[a-z]/cds;