Debian Codegraph @

t/RegularExpressions/ProhibitSingleCharAlternation.run

raw
1 ## name basic passes
2 ## failures 0
3 ## cut
4
5 m/\A [adiqrwx] \z/xms;
6 m/\A (?: qq | qr | qx | [qsy] | tr ) \z/xms;
7 m/\A (?: q[qrx] | [qsy] | tr ) \z/xms;
8
9 m/\A (?: a ) \z/xms; # bad form, but not a violation of this policy
10 m/\A (?: [a] ) \z/xms; # bad form, but not a violation of this policy
11
12 ## name warnings reported by users (App::Ack)
13 ## failures 1
14 ## cut
15
16 return ('shell',TEXT) if $header =~ /\b(?:ba|c|k|z)?sh\b/;
17
18 ## name metacharacters
19 ## failures 0
20 ## cut
21
22 m/(?: ^ | . | \d | $ )/xms;
23
24 ## name allowed to have one single character alternation
25 ## failures 0
26 ## cut
27
28 m/\A (?: a | do | in | queue | rue | woe | xray ) \z/xms;
29 return 1 if $file =~ m/ [.] (?: p (?: l x? | m ) | t | PL ) \z /xms;
30
31 ## name basic failures
32 ## failures 2
33 ## cut
34
35 m/\A (?: a | d | i | q | r | w | x ) \z/xms;
36 m/\A (?: qq| qr | qx | q | s | y | tr ) \z/xms;
37
38 ## name failing regexp with syntax error
39 ## failures 0
40 ## cut
41
42 m/\A (?: a | d | i | q | r | w | x ) ( \z/xms;
43
44 #-----------------------------------------------------------------------------
45 # Local Variables:
46 # mode: cperl
47 # cperl-indent-level: 4
48 # fill-column: 78
49 # indent-tabs-mode: nil
50 # c-indentation-style: bsd
51 # End:
52 # ex: set ts=8 sts=4 sw=4 tw=78 ft=perl expandtab shiftround :