nzakas/computer-science-in-javascript — Issue #4: base64
Author: Yaffle
Created: 2011-10-13 11:48:34+00:00
State: open

Your base64Decode fails on the following tests:
//
var tests = [
['YW55IGNhcm5hbCBwbGVhcw', 'any carnal pleas'],
['YQ', 'a'],
['YR', 'a'],
['', ''],
['YQA=', 'a\u0000'],
['YW55IGNhcm5hbCBwbGVhcw==YW55IGNhcm5hbCBwbGVhc3VyZS4=', 'any carnal pleasany carnal pleasure.'],
['YW55IGNhcm5hbCBwbGVhcw==YW55IGNhcm5hbCBwbGVhc3VyZS4', 'any carnal pleasany carnal pleasure.']
];

see https://gist.github.com/1284012