Comparison

spec/util_encodings_spec.lua @ 8371:09a1ce618ad0

spec/util.encodings: Fix syntax
author Kim Alvefur <zash@zash.se>
date Fri, 03 Nov 2017 15:43:36 +0100
parent 8370:2fba23c341d6
child 8372:872efae6e222
comparison
equal deleted inserted replaced
8370:2fba23c341d6 8371:09a1ce618ad0
4 4
5 describe("util.encodings", function () 5 describe("util.encodings", function ()
6 describe("#encode()", function() 6 describe("#encode()", function()
7 it("should work", function () 7 it("should work", function ()
8 assert.is.equal(encodings.base64.encode(""), ""); 8 assert.is.equal(encodings.base64.encode(""), "");
9 assert.is.equal(encodings.base64.encode('coucou') "Y291Y291"); 9 assert.is.equal(encodings.base64.encode('coucou'), "Y291Y291");
10 assert.is.equal(encodings.base64.encode("\0\0\0"), "AAAA"); 10 assert.is.equal(encodings.base64.encode("\0\0\0"), "AAAA");
11 end); 11 end);
12 end); 12 end);
13 describe("#decode()", function() 13 describe("#decode()", function()
14 it("should work", function () 14 it("should work", function ()
15 assert.is.equal(encodings.base64.decode(""), ""); 15 assert.is.equal(encodings.base64.decode(""), "");
16 assert.is.equal(encodings.base64.decode('Y291Y291') "coucou"); 16 assert.is.equal(encodings.base64.decode('Y291Y291'), "coucou");
17 assert.is.equal(encodings.base64.decode("AAAA"), "\0\0\0"); 17 assert.is.equal(encodings.base64.decode("AAAA"), "\0\0\0");
18 end); 18 end);
19 end); 19 end);
20 end); 20 end);
21 describe("util.encodings.utf8", function() 21 describe("util.encodings.utf8", function()