Comparison

spec/util_encodings_spec.lua @ 8373:af7b41a0ec9e

spec/util.encodings: Test a lonly padding (can appear like this in SASL)
author Kim Alvefur <zash@zash.se>
date Fri, 03 Nov 2017 15:44:43 +0100
parent 8372:872efae6e222
comparison
equal deleted inserted replaced
8372:872efae6e222 8373:af7b41a0ec9e
12 end); 12 end);
13 end); 13 end);
14 describe("#decode()", function() 14 describe("#decode()", function()
15 it("should work", function () 15 it("should work", function ()
16 assert.is.equal(encodings.base64.decode(""), ""); 16 assert.is.equal(encodings.base64.decode(""), "");
17 assert.is.equal(encodings.base64.decode("="), "");
17 assert.is.equal(encodings.base64.decode('Y291Y291'), "coucou"); 18 assert.is.equal(encodings.base64.decode('Y291Y291'), "coucou");
18 assert.is.equal(encodings.base64.decode("AAAA"), "\0\0\0"); 19 assert.is.equal(encodings.base64.decode("AAAA"), "\0\0\0");
19 assert.is.equal(encodings.base64.decode("////"), "\255\255\255"); 20 assert.is.equal(encodings.base64.decode("////"), "\255\255\255");
20 end); 21 end);
21 end); 22 end);