summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-04-02 11:58:19 +0200
committermadmaxoft <github@xoft.cz>2014-04-02 11:58:19 +0200
commit67d7ad86896e90b799a0479a86a6e764c7fe36da (patch)
treeb620bdc66bf5d15e4c04dac35c3f025c5b16a14f
parentAdded schematic string serializer self-test. (diff)
downloadcuberite-67d7ad86896e90b799a0479a86a6e764c7fe36da.tar
cuberite-67d7ad86896e90b799a0479a86a6e764c7fe36da.tar.gz
cuberite-67d7ad86896e90b799a0479a86a6e764c7fe36da.tar.bz2
cuberite-67d7ad86896e90b799a0479a86a6e764c7fe36da.tar.lz
cuberite-67d7ad86896e90b799a0479a86a6e764c7fe36da.tar.xz
cuberite-67d7ad86896e90b799a0479a86a6e764c7fe36da.tar.zst
cuberite-67d7ad86896e90b799a0479a86a6e764c7fe36da.zip
-rw-r--r--MCServer/Plugins/Debuggers/Debuggers.lua27
1 files changed, 23 insertions, 4 deletions
diff --git a/MCServer/Plugins/Debuggers/Debuggers.lua b/MCServer/Plugins/Debuggers/Debuggers.lua
index 2619bd6c4..064d5d772 100644
--- a/MCServer/Plugins/Debuggers/Debuggers.lua
+++ b/MCServer/Plugins/Debuggers/Debuggers.lua
@@ -69,12 +69,13 @@ function Initialize(Plugin)
LOG("Initialized " .. Plugin:GetName() .. " v." .. Plugin:GetVersion())
- -- TestBlockAreas();
- -- TestSQLiteBindings();
- -- TestExpatBindings();
- -- TestPluginCalls();
+ -- TestBlockAreas()
+ -- TestSQLiteBindings()
+ -- TestExpatBindings()
+ -- TestPluginCalls()
TestBlockAreasString()
+ TestStringBase64()
--[[
-- Test cCompositeChat usage in console-logging:
@@ -252,6 +253,24 @@ end
+function TestStringBase64()
+ -- Create a binary string:
+ local s = ""
+ for i = 0, 255 do
+ s = s .. string.char(i)
+ end
+
+ -- Roundtrip through Base64:
+ local Base64 = Base64Encode(s)
+ local UnBase64 = Base64Decode(Base64)
+
+ assert(UnBase64 == s)
+end
+
+
+
+
+
function TestSQLiteBindings()
LOG("Testing SQLite bindings...");