Mercurial > vim
comparison src/testdir/test_vim9_builtin.vim @ 24222:a2e6029d354e v8.2.2652
patch 8.2.2652: Vim9: can use command modifier without an effect
Commit: https://github.com/vim/vim/commit/fa984418e7becd8e7d6543cd3ea25f605e9ac97f
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 25 22:15:28 2021 +0100
patch 8.2.2652: Vim9: can use command modifier without an effect
Problem: Vim9: can use command modifier without an effect.
Solution: Give an error for a misplaced command modifier. Fix error message
number.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 25 Mar 2021 22:30:04 +0100 |
parents | 083f07f99e20 |
children | 35603c7991d7 |
comparison
equal
deleted
inserted
replaced
24221:70ef6b343eee | 24222:a2e6029d354e |
---|---|
245 enddef | 245 enddef |
246 | 246 |
247 def Test_exepath() | 247 def Test_exepath() |
248 CheckDefExecFailure(['echo exepath(true)'], 'E1174:') | 248 CheckDefExecFailure(['echo exepath(true)'], 'E1174:') |
249 CheckDefExecFailure(['echo exepath(v:null)'], 'E1174:') | 249 CheckDefExecFailure(['echo exepath(v:null)'], 'E1174:') |
250 CheckDefExecFailure(['echo exepath("")'], 'E1142:') | 250 CheckDefExecFailure(['echo exepath("")'], 'E1175:') |
251 enddef | 251 enddef |
252 | 252 |
253 def Test_expand() | 253 def Test_expand() |
254 split SomeFile | 254 split SomeFile |
255 expand('%', true, true)->assert_equal(['SomeFile']) | 255 expand('%', true, true)->assert_equal(['SomeFile']) |
404 enddef | 404 enddef |
405 | 405 |
406 def Test_finddir() | 406 def Test_finddir() |
407 CheckDefExecFailure(['echo finddir(true)'], 'E1174:') | 407 CheckDefExecFailure(['echo finddir(true)'], 'E1174:') |
408 CheckDefExecFailure(['echo finddir(v:null)'], 'E1174:') | 408 CheckDefExecFailure(['echo finddir(v:null)'], 'E1174:') |
409 CheckDefExecFailure(['echo finddir("")'], 'E1142:') | 409 CheckDefExecFailure(['echo finddir("")'], 'E1175:') |
410 enddef | 410 enddef |
411 | 411 |
412 def Test_findfile() | 412 def Test_findfile() |
413 CheckDefExecFailure(['echo findfile(true)'], 'E1174:') | 413 CheckDefExecFailure(['echo findfile(true)'], 'E1174:') |
414 CheckDefExecFailure(['echo findfile(v:null)'], 'E1174:') | 414 CheckDefExecFailure(['echo findfile(v:null)'], 'E1174:') |
415 CheckDefExecFailure(['echo findfile("")'], 'E1142:') | 415 CheckDefExecFailure(['echo findfile("")'], 'E1175:') |
416 enddef | 416 enddef |
417 | 417 |
418 def Test_flattennew() | 418 def Test_flattennew() |
419 var lines =<< trim END | 419 var lines =<< trim END |
420 var l = [1, [2, [3, 4]], 5] | 420 var l = [1, [2, [3, 4]], 5] |