Imported Upstream version 2.5.11
[libapache-mod-security.git] / apache2 / t / tfn / base64Decode.t
1 ### Empty
2 {
3         type => "tfn",
4         name => "base64Decode",
5         input => "",
6         output => "",
7         ret => 0,
8 },
9
10 ### Test values with varying lengths to check padding
11 {
12         type => "tfn",
13         name => "base64Decode",
14         input => "VGVzdENhc2U=",
15         output => "TestCase",
16         ret => 1,
17 },
18 {
19         type => "tfn",
20         name => "base64Decode",
21         input => "VGVzdENhc2Ux",
22         output => "TestCase1",
23         ret => 1,
24 },
25 {
26         type => "tfn",
27         name => "base64Decode",
28         input => "VGVzdENhc2UxMg==",
29         output => "TestCase12",
30         ret => 1,
31 },
32
33
34 ### Check with a NUL
35 {
36         type => "tfn",
37         name => "base64Decode",
38         input => "VGVzdABDYXNl",
39         output => "Test\0Case",
40         ret => 1,
41 },
42
43 ### Invalid
44 # What should happen here?  Probably just fail and leave alone.
45 {
46         type => "tfn",
47         name => "base64Decode",
48         input => "VGVzdENhc2U=\0VGVzdENhc2U=",
49         output => "TestCase",
50         ret => 1,
51 },