diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2024-05-17 18:20:43 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-05-17 18:20:43 +0200 |
commit | fe424d13ef6e5486923f23f15bb6951e3079412e (patch) | |
tree | 7d0bcbeab9b24aa19a24296f9e8e210ad238cc35 /src/testdir/test_vim9_import.vim | |
parent | e595e9c31b651bcb15d2f40ff00fffa432370484 (diff) |
patch 9.1.0415: Some functions are not testedv9.1.0415
Problem: Some functions are not tested
Solution: Add a few more tests, fix a few minor problems
(Yegappan Lakshmanan)
closes: #14789
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir/test_vim9_import.vim')
-rw-r--r-- | src/testdir/test_vim9_import.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_import.vim b/src/testdir/test_vim9_import.vim index 61184a1f48..3067ef6c9e 100644 --- a/src/testdir/test_vim9_import.vim +++ b/src/testdir/test_vim9_import.vim @@ -3311,4 +3311,20 @@ def Test_import_from_vimrc() delete('Xoutput.log') enddef +" Test for changing a locked imported variable +def Test_import_locked_var() + var lines =<< trim END + vim9script + export var Foo: number = 10 + lockvar Foo + END + writefile(lines, 'Ximportlockedvar.vim', 'D') + lines =<< trim END + vim9script + import './Ximportlockedvar.vim' as Bar + Bar.Foo = 20 + END + v9.CheckScriptFailure(lines, 'E741: Value is locked: Foo', 3) +enddef + " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker |