aboutsummaryrefslogtreecommitdiff
path: root/test/functional/eval/null_spec.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2016-09-18 01:59:07 +0300
committerZyX <kp-pav@yandex.ru>2017-03-29 10:08:06 +0300
commitf80a00469fdba8a3dec0edae30c911d050485055 (patch)
treef42ea5ec669479c0b34d6923b34a553fa49a7edf /test/functional/eval/null_spec.lua
parent82e6cac5f9d437da5aeb8c4cf51945cfeb5922ff (diff)
downloadrneovim-f80a00469fdba8a3dec0edae30c911d050485055.tar.gz
rneovim-f80a00469fdba8a3dec0edae30c911d050485055.tar.bz2
rneovim-f80a00469fdba8a3dec0edae30c911d050485055.zip
eval/typval: Make tv_list_concat handle NULL lists correctly
Fixes some FIXMEs in eval/null_spec.lua.
Diffstat (limited to 'test/functional/eval/null_spec.lua')
-rw-r--r--test/functional/eval/null_spec.lua12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/functional/eval/null_spec.lua b/test/functional/eval/null_spec.lua
index 9a35905be0..ccdd1ce34c 100644
--- a/test/functional/eval/null_spec.lua
+++ b/test/functional/eval/null_spec.lua
@@ -61,14 +61,6 @@ describe('NULL', function()
null_list_expr_test('is equal to itself', 'L == L', 0, 0)
-- FIXME Should return 0
null_list_expr_test('is not not equal to itself', 'L != L', 0, 1)
- -- FIXME Should return empty list
- null_list_expr_test('can be added to itself', '(L + L)', 'E15: Invalid expression: (L + L)', nil)
- -- FIXME Should return [1]
- null_list_expr_test('can be added to non-empty list (reversed)', '(L + [1])',
- 'E15: Invalid expression: (L + [1])', nil)
- -- FIXME Should return [1]
- null_list_expr_test('can be added to non-empty list', '([1] + L)',
- 'E15: Invalid expression: ([1] + L)', nil)
-- FIXME Should return 1
null_list_expr_test('counts correctly', 'count([L], L)', 0, 0)
-- FIXME should be accepted by inputlist()
@@ -137,5 +129,9 @@ describe('NULL', function()
null_list_expr_test('is stringified correctly', 'string(L)', 0, '[]')
null_list_expr_test('is JSON encoded correctly', 'json_encode(L)', 0, '[]')
null_list_test('does not crash lockvar', 'lockvar! L', 0)
+ null_list_expr_test('can be added to itself', '(L + L)', 0, {})
+ null_list_expr_test('can be added to itself', '(L + L) is L', 0, 1)
+ null_list_expr_test('can be added to non-empty list', '([1] + L)', 0, {1})
+ null_list_expr_test('can be added to non-empty list (reversed)', '(L + [1])', 0, {1})
end)
end)