Add initial unit testing framework. See #438.

This commit is contained in:
brectanus
2007-12-19 00:09:30 +00:00
parent 2657154eaa
commit 499c3f3167
54 changed files with 2249 additions and 3 deletions

View File

@@ -0,0 +1,51 @@
### Empty
{
type => "tfns",
name => "base64Decode",
input => "",
output => "",
ret => 0,
},
### Test values with varying lengths to check padding
{
type => "tfns",
name => "base64Decode",
input => "VGVzdENhc2U=",
output => "TestCase",
ret => 1,
},
{
type => "tfns",
name => "base64Decode",
input => "VGVzdENhc2Ux",
output => "TestCase1",
ret => 1,
},
{
type => "tfns",
name => "base64Decode",
input => "VGVzdENhc2UxMg==",
output => "TestCase12",
ret => 1,
},
### Check with a NUL
{
type => "tfns",
name => "base64Decode",
input => "VGVzdABDYXNl",
output => "Test\0Case",
ret => 1,
},
### Invalid
# What should happen here? Probably just fail and leave alone.
{
type => "tfns",
name => "base64Decode",
input => "VGVzdENhc2U=\0VGVzdENhc2U=",
output => "VGVzdENhc2U=\0VGVzdENhc2U=",
ret => 0,
},