Imported Upstream version 2.5.11
[libapache-mod-security.git] / apache2 / t / tfn / replaceComments.t
1 ### Empty
2 {
3         type => "tfn",
4         name => "replaceComments",
5         input => "",
6         output => "",
7         ret => 0,
8 },
9
10 ### Nothing
11 {
12         type => "tfn",
13         name => "replaceComments",
14         input => "TestCase",
15         output => "TestCase",
16         ret => 0,
17 },
18 {
19         type => "tfn",
20         name => "replaceComments",
21         input => "Test\0Case",
22         output => "Test\0Case",
23         ret => 0,
24 },
25
26
27 ### Basics
28 {
29         type => "tfn",
30         name => "replaceComments",
31         input => "/* TestCase */",
32         output => " ",
33         ret => 1,
34 },
35 {
36         type => "tfn",
37         name => "replaceComments",
38         input => "/*TestCase*/",
39         output => " ",
40         ret => 1,
41 },
42 {
43         type => "tfn",
44         name => "replaceComments",
45         input => "/* TestCase*/",
46         output => " ",
47         ret => 1,
48 },
49 {
50         type => "tfn",
51         name => "replaceComments",
52         input => "/*TestCase */",
53         output => " ",
54         ret => 1,
55 },
56 {
57         type => "tfn",
58         name => "replaceComments",
59         input => "Before/* TestCase */After",
60         output => "Before After",
61         ret => 1,
62 },
63 {
64         type => "tfn",
65         name => "replaceComments",
66         input => "Before /* TestCase */ After",
67         output => "Before   After",
68         ret => 1,
69 },
70 {
71         type => "tfn",
72         name => "replaceComments",
73         input => "/* Test\nCase */",
74         output => " ",
75         ret => 1,
76 },
77 {
78         type => "tfn",
79         name => "replaceComments",
80         input => "/* Test\x0d\x0aCase */",
81         output => " ",
82         ret => 1,
83 },
84 {
85         type => "tfn",
86         name => "replaceComments",
87         input => "/* Test\x0aCase */",
88         output => " ",
89         ret => 1,
90 },
91 {
92         type => "tfn",
93         name => "replaceComments",
94         input => "/* Test\x0dCase */",
95         output => " ",
96         ret => 1,
97 },
98
99 ### Broken Comments
100 {
101         type => "tfn",
102         name => "replaceComments",
103         input => "Before/* Test\x0d\x0aCase ",
104         output => "Before ",
105         ret => 1,
106 },
107 {
108         type => "tfn",
109         name => "replaceComments",
110         input => "Before /* Test\x0aCase ",
111         output => "Before  ",
112         ret => 1,
113 },
114 {
115         type => "tfn",
116         name => "replaceComments",
117         input => "Before/* Test\x0d\x0aCase ",
118         output => "Before ",
119         ret => 1,
120 },
121 {
122         type => "tfn",
123         name => "replaceComments",
124         input => "Before /* Test\x0aCase ",
125         output => "Before  ",
126         ret => 1,
127 },
128 {
129         type => "tfn",
130         name => "replaceComments",
131         input => "Test\x0d\x0aCase */After",
132         output => "Test\x0d\x0aCase */After",
133         ret => 0,
134 },
135 {
136         type => "tfn",
137         name => "replaceComments",
138         input => "Test\x0aCase */ After",
139         output => "Test\x0aCase */ After",
140         ret => 0,
141 },
142 {
143         type => "tfn",
144         name => "replaceComments",
145         input => "Test\x0d\x0aCase */After",
146         output => "Test\x0d\x0aCase */After",
147         ret => 0,
148 },
149 {
150         type => "tfn",
151         name => "replaceComments",
152         input => "Test\x0aCase */ After",
153         output => "Test\x0aCase */ After",
154         ret => 0,
155 },