summaryrefslogtreecommitdiff
path: root/tests/modules
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-25 19:15:32 +0800
committerOpportunityLiu <[email protected]>2019-07-25 19:15:32 +0800
commit68f96b225c4da758a87a90f5723025be7b2fafc1 (patch)
treee4452c4851e3b0cd99125c67df218f09a65850f8 /tests/modules
parent5e8049c85f976305206ed2117b71168b1972704c (diff)
add binary mode
Diffstat (limited to 'tests/modules')
-rw-r--r--tests/modules/string/serialize/test.lua7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/modules/string/serialize/test.lua b/tests/modules/string/serialize/test.lua
index a85868e7e..1ab3852ba 100644
--- a/tests/modules/string/serialize/test.lua
+++ b/tests/modules/string/serialize/test.lua
@@ -1,6 +1,9 @@
-function roundtrip(v)
- return string.serialize(v):deserialize()
+function roundtrip(round0)
+ local round1 = string.serialize(round0, false):deserialize()
+ local round2 = string.serialize(round1, true):deserialize()
+ local round3 = string.serialize(round2, {binary=true}):deserialize()
+ return round3
end
function test_number(t)