Mercurial > vim
comparison src/testdir/test_vim9_cmd.vim @ 26240:640b62dbf6cb v8.2.3651
patch 8.2.3651: Vim9: no error for :lock or :unlock with unknown variable
Commit: https://github.com/vim/vim/commit/04b568b38f848293e1ae0e680685280151acb386
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Nov 22 21:58:41 2021 +0000
patch 8.2.3651: Vim9: no error for :lock or :unlock with unknown variable
Problem: Vim9: no error for :lock or :unlock with unknown variable.
Solution: Give an error. (closes https://github.com/vim/vim/issues/9188)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 22 Nov 2021 23:00:03 +0100 |
parents | 269ecc6d69bc |
children | 3711e56f7e7b |
comparison
equal
deleted
inserted
replaced
26239:5187470e768c | 26240:640b62dbf6cb |
---|---|
1368 lines =<< trim END | 1368 lines =<< trim END |
1369 var theList = [1, 2, 3] | 1369 var theList = [1, 2, 3] |
1370 unlockvar theList | 1370 unlockvar theList |
1371 END | 1371 END |
1372 CheckDefFailure(lines, 'E1178', 2) | 1372 CheckDefFailure(lines, 'E1178', 2) |
1373 | |
1374 lines =<< trim END | |
1375 vim9script | |
1376 var name = 'john' | |
1377 lockvar nameX | |
1378 END | |
1379 CheckScriptFailure(lines, 'E1246', 3) | |
1380 | |
1381 lines =<< trim END | |
1382 vim9script | |
1383 var name = 'john' | |
1384 def LockIt() | |
1385 lockvar nameX | |
1386 enddef | |
1387 LockIt() | |
1388 END | |
1389 CheckScriptFailure(lines, 'E1246', 1) | |
1373 enddef | 1390 enddef |
1374 | 1391 |
1375 def Test_substitute_expr() | 1392 def Test_substitute_expr() |
1376 var to = 'repl' | 1393 var to = 'repl' |
1377 new | 1394 new |