Imported Upstream version 2.5.11
[libapache-mod-security.git] / apache2 / t / tfn / compressWhitespace.t
1 ### Empty
2 {
3         type => "tfn",
4         name => "compressWhitespace",
5         input => "",
6         output => "",
7         ret => 0,
8 },
9
10 ### Nothing
11 {
12         type => "tfn",
13         name => "compressWhitespace",
14         input => "TestCase",
15         output => "TestCase",
16         ret => 0,
17 },
18 {
19         type => "tfn",
20         name => "compressWhitespace",
21         input => "Test\0Case",
22         output => "Test\0Case",
23         ret => 0,
24 },
25 {
26         type => "tfn",
27         name => "compressWhitespace",
28         input => "Test Case",
29         output => "Test Case",
30         ret => 0,
31 },
32
33
34 ### Compress space/tab
35 {
36         type => "tfn",
37         name => "compressWhitespace",
38         input => "  Test  \t   Case  ",
39         output => " Test Case ",
40         ret => 1,
41 },
42
43 ### Pretty much everything in one
44 {
45         type => "tfn",
46         name => "compressWhitespace",
47         input => "This is a   test case with a tab \t, vtab \x0b, newline \x0a, return \x0d, formfeed \f, and a NUL\0 in it with a CRLF at the end.\x0d\x0a",
48         output => "This is a test case with a tab , vtab , newline , return , formfeed , and a NUL\0 in it with a CRLF at the end. ",
49         ret => 1,
50 },