Software /
code /
prosody
Changeset
8372:872efae6e222
spec/util.encodings: Test an UTF-8 sequence
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 03 Nov 2017 15:44:39 +0100 |
parents | 8371:09a1ce618ad0 |
children | 8373:af7b41a0ec9e |
files | spec/util_encodings_spec.lua |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/spec/util_encodings_spec.lua Fri Nov 03 15:43:36 2017 +0100 +++ b/spec/util_encodings_spec.lua Fri Nov 03 15:44:39 2017 +0100 @@ -8,6 +8,7 @@ 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 @@ 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);