Mercurial > vim
comparison src/testdir/test_vim9_func.vim @ 21176:54c665ad2db3 v8.2.1139
patch 8.2.1139: Vim9: test for silent echo fails in some environments
Commit: https://github.com/vim/vim/commit/8f510afcd616fc62291fb41f9dd03ce298f1c601
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 5 18:48:23 2020 +0200
patch 8.2.1139: Vim9: test for silent echo fails in some environments
Problem: Vim9: test for silent echo fails in some environments.
Solution: Use :function instead of :def.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 05 Jul 2020 19:00:04 +0200 |
parents | 95abb4b22905 |
children | fab2085e417f |
comparison
equal
deleted
inserted
replaced
21175:380021ad2a45 | 21176:54c665ad2db3 |
---|---|
918 | 918 |
919 def Test_line_continuation_in_def() | 919 def Test_line_continuation_in_def() |
920 assert_equal('full', Line_continuation_in_def('.')) | 920 assert_equal('full', Line_continuation_in_def('.')) |
921 enddef | 921 enddef |
922 | 922 |
923 def Test_silent_echo() | 923 func Test_silent_echo() |
924 CheckScreendump | 924 CheckScreendump |
925 | 925 |
926 let lines =<< trim END | 926 let lines =<< trim END |
927 vim9script | 927 vim9script |
928 def EchoNothing() | 928 def EchoNothing() |
929 silent echo '' | 929 silent echo '' |
930 enddef | 930 enddef |
931 defcompile | 931 defcompile |
932 END | 932 END |
933 writefile(lines, 'XTest_silent_echo') | 933 call writefile(lines, 'XTest_silent_echo') |
934 | 934 |
935 " Check that the balloon shows up after a mouse move | 935 " Check that the balloon shows up after a mouse move |
936 let buf = RunVimInTerminal('-S XTest_silent_echo', {'rows': 6}) | 936 let buf = RunVimInTerminal('-S XTest_silent_echo', {'rows': 6}) |
937 term_sendkeys(buf, ":abc") | 937 call term_sendkeys(buf, ":abc") |
938 call VerifyScreenDump(buf, 'Test_vim9_silent_echo', {}) | 938 call VerifyScreenDump(buf, 'Test_vim9_silent_echo', {}) |
939 | 939 |
940 " clean up | 940 " clean up |
941 call StopVimInTerminal(buf) | 941 call StopVimInTerminal(buf) |
942 call delete('XTest_silent_echo') | 942 call delete('XTest_silent_echo') |
943 enddef | 943 endfunc |
944 | 944 |
945 | 945 |
946 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker | 946 " vim: ts=8 sw=2 sts=2 expandtab tw=80 fdm=marker |