mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 05:07:42 +03:00
spec/util.encodings: Test an UTF-8 sequence
This commit is contained in:
parent
546aedf27a
commit
72cfc3161c
1 changed files with 2 additions and 0 deletions
|
@ -8,6 +8,7 @@ describe("util.encodings", function ()
|
|||
assert.is.equal(encodings.base64.encode(""), "");
|
||||
assert.is.equal(encodings.base64.encode('coucou'), "Y291Y291");
|
||||
assert.is.equal(encodings.base64.encode("\0\0\0"), "AAAA");
|
||||
assert.is.equal(encodings.base64.encode("\255\255\255"), "////");
|
||||
end);
|
||||
end);
|
||||
describe("#decode()", function()
|
||||
|
@ -15,6 +16,7 @@ describe("util.encodings", function ()
|
|||
assert.is.equal(encodings.base64.decode(""), "");
|
||||
assert.is.equal(encodings.base64.decode('Y291Y291'), "coucou");
|
||||
assert.is.equal(encodings.base64.decode("AAAA"), "\0\0\0");
|
||||
assert.is.equal(encodings.base64.decode("////"), "\255\255\255");
|
||||
end);
|
||||
end);
|
||||
end);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue