aboutsummaryrefslogtreecommitdiff
path: root/test/unit/eval/typval_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
committerJosh Rahm <joshuarahm@gmail.com>2023-01-25 18:31:31 +0000
commit9243becbedbb6a1592208051f8fa2b090dcc5e7d (patch)
tree607c2a862ec3f4399b8766383f6f8e04c4aa43b4 /test/unit/eval/typval_spec.lua
parent9e40b6e9e1bc67f2d856adb837ee64dd0e25b717 (diff)
parent3c48d3c83fc21dbc0841f9210f04bdb073d73cd1 (diff)
downloadrneovim-usermarks.tar.gz
rneovim-usermarks.tar.bz2
rneovim-usermarks.zip
Merge remote-tracking branch 'upstream/master' into usermarksusermarks
Diffstat (limited to 'test/unit/eval/typval_spec.lua')
-rw-r--r--test/unit/eval/typval_spec.lua14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/unit/eval/typval_spec.lua b/test/unit/eval/typval_spec.lua
index 6387f89fe4..128625374e 100644
--- a/test/unit/eval/typval_spec.lua
+++ b/test/unit/eval/typval_spec.lua
@@ -2175,7 +2175,8 @@ describe('typval.c', function()
eq({a='TSET'}, dct2tbl(d1))
eq({a='TSET'}, dct2tbl(d2))
end)
- itp('disallows overriding builtin or user functions', function()
+ pending('disallows overriding builtin or user functions: here be the dragons', function()
+ -- pending: see TODO below
local d = dict()
d.dv_scope = lib.VAR_DEF_SCOPE
local f_lua = {
@@ -2196,6 +2197,7 @@ describe('typval.c', function()
local d5 = dict({Test=f_tv})
local d6 = dict({Test=p_tv})
eval0([[execute("function Test()\nendfunction")]])
+ -- TODO: test breaks at this point
tv_dict_extend(d, d2, 'force',
'E704: Funcref variable name must start with a capital: tr')
tv_dict_extend(d, d3, 'force',
@@ -2253,8 +2255,8 @@ describe('typval.c', function()
local d1 = dict()
alloc_log:check({a.dict(d1)})
eq(1, d1.dv_refcount)
- eq(false, tv_dict_equal(nil, d1))
- eq(false, tv_dict_equal(d1, nil))
+ eq(true, tv_dict_equal(nil, d1))
+ eq(true, tv_dict_equal(d1, nil))
eq(true, tv_dict_equal(d1, d1))
eq(1, d1.dv_refcount)
alloc_log:check({})
@@ -2623,7 +2625,7 @@ describe('typval.c', function()
describe('check_lock()', function()
local function tv_check_lock(lock, name, name_len, emsg)
return check_emsg(function()
- return lib.var_check_lock(lock, name, name_len)
+ return lib.value_check_lock(lock, name, name_len)
end, emsg)
end
itp('works', function()
@@ -2721,8 +2723,8 @@ describe('typval.c', function()
local d1 = lua2typvalt({})
alloc_log:check({a.dict(d1.vval.v_dict)})
eq(1, d1.vval.v_dict.dv_refcount)
- eq(false, tv_equal(nd, d1))
- eq(false, tv_equal(d1, nd))
+ eq(true, tv_equal(nd, d1))
+ eq(true, tv_equal(d1, nd))
eq(true, tv_equal(d1, d1))
eq(1, d1.vval.v_dict.dv_refcount)
alloc_log:check({})