Commit bf4ac710 authored by François Perrad's avatar François Perrad
Browse files

more tests

parent 1842c7d3
......@@ -2,7 +2,7 @@
require 'Test.More'
plan(1)
plan(3)
local mp = require 'MessagePack'
......@@ -29,3 +29,13 @@ end
local mpac = mp.pack({1, 2, 3})
local s = 'BAR' .. mpac .. 'BAZ'
eq_array( my_unpack(s, 4, #s - 3), {1, 2, 3}, "my_unpack" )
error_like( function ()
my_unpack(s, 4)
end,
"extra bytes" )
error_like( function ()
my_unpack(s, 4, #s - 4)
end,
"missing bytes" )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment