diff options
author | Yegappan Lakshmanan <yegappan@yahoo.com> | 2024-05-20 13:57:11 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2024-05-20 13:57:11 +0200 |
commit | 22029edb6c7b2cb146668354daad60bfe59eaac1 (patch) | |
tree | 0687149323a0c51cfd17f318e0e7958d0771d94d /src/testdir | |
parent | 5f1b115afd92544ce64d563da0d8ee9844abb10a (diff) |
patch 9.1.0422: function echo_string_core() is too longv9.1.0422
Problem: function echo_string_core() is too long
Solution: Refactor into several smaller functions
(Yegappan Lakshmanan)
closes: #14804
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_vim9_script.vim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim index a640fce9bd..0b17150094 100644 --- a/src/testdir/test_vim9_script.vim +++ b/src/testdir/test_vim9_script.vim @@ -2159,6 +2159,18 @@ def Test_echo_cmd() assert_match('^two$', g:Screenline(&lines)) v9.CheckDefFailure(['echo "xxx"# comment'], 'E488:') + + # Test for echoing a script local function name + var lines =<< trim END + vim9script + def ScriptLocalEcho() + enddef + echo ScriptLocalEcho + END + new + setline(1, lines) + assert_match('<SNR>\d\+_ScriptLocalEcho', execute('source')->split("\n")[0]) + bw! enddef def Test_echomsg_cmd() |