functests/msgpack: Test dumping special nil and bool dicts

This commit is contained in:
ZyX
2016-01-31 02:32:46 +03:00
parent 6e5498c3e3
commit f5c35ba109

View File

@@ -528,6 +528,20 @@ describe('msgpackdump() function', function()
it('can v:null', function() it('can v:null', function()
execute('let todump = v:null') execute('let todump = v:null')
end)
it('can dump special bool mapping (true)', function()
execute('let todump = {"_TYPE": v:msgpack_types.boolean, "_VAL": 1}')
eq({'\195'}, eval('msgpackdump([todump])'))
end)
it('can dump special bool mapping (false)', function()
execute('let todump = {"_TYPE": v:msgpack_types.boolean, "_VAL": 0}')
eq({'\194'}, eval('msgpackdump([todump])'))
end)
it('can dump special nil mapping', function()
execute('let todump = {"_TYPE": v:msgpack_types.nil, "_VAL": 0}')
eq({'\192'}, eval('msgpackdump([todump])')) eq({'\192'}, eval('msgpackdump([todump])'))
end) end)