diff options
author | Matthieu Coudron <mattator@gmail.com> | 2020-04-27 21:12:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-27 21:12:12 +0200 |
commit | c7d3630e214012667e855c30cde2808a5fe59650 (patch) | |
tree | cc2024053865052d34e7e8ebebbd45a4064d29ee /test/unit/eval | |
parent | d90a92bcd3c18111abb62a57192c9e151839a7f4 (diff) | |
parent | e34684b2ad02e759dec39c0f0958c7882120ecdc (diff) | |
download | rneovim-c7d3630e214012667e855c30cde2808a5fe59650.tar.gz rneovim-c7d3630e214012667e855c30cde2808a5fe59650.tar.bz2 rneovim-c7d3630e214012667e855c30cde2808a5fe59650.zip |
Merge pull request #11943 from yatli/master
[RDY] API/UI: Allow UI to set PUM position and size, and pass the position to CompleteChanged
Diffstat (limited to 'test/unit/eval')
-rw-r--r-- | test/unit/eval/typval_spec.lua | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/unit/eval/typval_spec.lua b/test/unit/eval/typval_spec.lua index 1651eb9bcc..ea86ccbf1c 100644 --- a/test/unit/eval/typval_spec.lua +++ b/test/unit/eval/typval_spec.lua @@ -2026,6 +2026,26 @@ describe('typval.c', function() alloc_log:check({}) end) end) + describe('float()', function() + itp('works', function() + local d = dict({test=10}) + alloc_log:clear() + eq({test=10}, dct2tbl(d)) + eq(OK, lib.tv_dict_add_float(d, 'testt', 3, 1.5)) + local dis = dict_items(d) + alloc_log:check({a.di(dis.tes, 'tes')}) + eq({test=10, tes=1.5}, dct2tbl(d)) + eq(FAIL, check_emsg(function() return lib.tv_dict_add_float(d, 'testt', 3, 1.5) end, + 'E685: Internal error: hash_add()')) + alloc_log:clear() + lib.emsg_skip = lib.emsg_skip + 1 + eq(FAIL, check_emsg(function() return lib.tv_dict_add_float(d, 'testt', 3, 1.5) end, + nil)) + lib.emsg_skip = lib.emsg_skip - 1 + alloc_log:clear_tmp_allocs() + alloc_log:check({}) + end) + end) describe('str()', function() itp('works', function() local d = dict({test=10}) |