Mercurial > vim
diff src/testdir/test_vim9_script.vim @ 30217:e0cb5fb44859 v9.0.0444
patch 9.0.0444: trying to declare g:variable gives confusing error
Commit: https://github.com/vim/vim/commit/9510d22463055f56548ff461ccbc54caa1ba1a2f
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Sep 11 15:14:05 2022 +0100
patch 9.0.0444: trying to declare g:variable gives confusing error
Problem: Trying to declare g:variable gives confusing error.
Solution: Give a better error message. (closes https://github.com/vim/vim/issues/11108)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 11 Sep 2022 16:15:04 +0200 |
parents | 13b02c1ea0f7 |
children | 327bca7b70ea |
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -4241,13 +4241,12 @@ func Test_misplaced_type() endfunc def Run_Test_misplaced_type() - writefile(['let g:somevar = "asdf"'], 'XTest_misplaced_type') + writefile(['let g:somevar = "asdf"'], 'XTest_misplaced_type', 'D') var buf = g:RunVimInTerminal('-S XTest_misplaced_type', {'rows': 6}) - term_sendkeys(buf, ":vim9cmd echo islocked('g:somevar: string')\<CR>") + term_sendkeys(buf, ":vim9cmd echo islocked('somevar: string')\<CR>") g:VerifyScreenDump(buf, 'Test_misplaced_type', {}) g:StopVimInTerminal(buf) - delete('XTest_misplaced_type') enddef " Ensure echo doesn't crash when stringifying empty variables.