summaryrefslogtreecommitdiff
path: root/src/testdir/test_vim9_expr.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-12 17:35:58 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-12 17:35:58 +0200
commit17a836cbee6b8d8ff555f8e307f48a779908db41 (patch)
treea2c6a927d875e586e9ee3744697e9c77ec167404 /src/testdir/test_vim9_expr.vim
parented677f5587af366f185f8922b7dde4a98c884328 (diff)
downloadvim-git-17a836cbee6b8d8ff555f8e307f48a779908db41.tar.gz
patch 8.2.1429: Vim9: no error for missing white after : in dictv8.2.1429
Problem: Vim9: no error for missing white after : in dict. Solution: Check for white space. (closes #6671) Also check that there is no white before the :.
Diffstat (limited to 'src/testdir/test_vim9_expr.vim')
-rw-r--r--src/testdir/test_vim9_expr.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_expr.vim b/src/testdir/test_vim9_expr.vim
index 3d1605356..a942dd4de 100644
--- a/src/testdir/test_vim9_expr.vim
+++ b/src/testdir/test_vim9_expr.vim
@@ -1494,6 +1494,10 @@ def Test_expr7_dict()
mixed = #{a: 234}
mixed = #{}
+ call CheckDefFailure(["let x = #{a:8}"], 'E1069:')
+ call CheckDefFailure(["let x = #{a : 8}"], 'E1068:')
+ call CheckDefFailure(["let x = #{a :8}"], 'E1068:')
+
call CheckDefFailure(["let x = #{8: 8}"], 'E1014:')
call CheckDefFailure(["let x = #{xxx}"], 'E720:')
call CheckDefFailure(["let x = #{xxx: 1", "let y = 2"], 'E722:')