diff options
author | Kim Alvefur <zash@zash.se> | 2017-11-03 15:44:39 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-11-03 15:44:39 +0100 |
commit | 5567d02e1f5342933a5d17733cabecaa9088f390 (patch) | |
tree | 590bc27d63abf97d5d8bec89d1457ae8c84ae024 | |
parent | 6fafcad90dd898498651ef4a46d18949843f61cb (diff) | |
download | prosody-5567d02e1f5342933a5d17733cabecaa9088f390.tar.gz prosody-5567d02e1f5342933a5d17733cabecaa9088f390.zip |
spec/util.encodings: Test an UTF-8 sequence
-rw-r--r-- | spec/util_encodings_spec.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spec/util_encodings_spec.lua b/spec/util_encodings_spec.lua index 584fb4e6..018b8553 100644 --- a/spec/util_encodings_spec.lua +++ b/spec/util_encodings_spec.lua @@ -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); |