1
0
forked from aniani/vim

patch 8.2.0639: MS-Windows: messages test still fails

Problem:    MS-Windows: messages test still fails.
Solution:   Filter out the maintainer message.
This commit is contained in:
Bram Moolenaar
2020-04-25 17:13:56 +02:00
parent 47a1a8baf9
commit 49b2fb36ca
2 changed files with 19 additions and 16 deletions

View File

@@ -3,21 +3,27 @@
source shared.vim
source term_util.vim
function Test_messages()
" Get all messages but drop the maintainer entry.
func GetMessages()
redir => result
redraw | messages
redir END
let msg_list = split(result, "\n")
if msg_list->len() > 0 && msg_list[0] =~ 'Messages maintainer:'
return msg_list[1:]
endif
return msg_list
endfunc
func Test_messages()
let oldmore = &more
try
set nomore
" Avoid the "message maintainer" line.
let $LANG = ''
let $LC_ALL = ''
let $LC_MESSAGES = ''
let $LC_COLLATE = ''
let arr = map(range(10), '"hello" . v:val')
for s in arr
echomsg s | redraw
endfor
let result = ''
" get last two messages
redir => result
@@ -28,24 +34,19 @@ function Test_messages()
" clear messages without last one
1messages clear
redir => result
redraw | messages
redir END
let msg_list = split(result, "\n")
let msg_list = GetMessages()
call assert_equal(['hello9'], msg_list)
" clear all messages
messages clear
redir => result
redraw | messages
redir END
call assert_equal('', result)
let msg_list = GetMessages()
call assert_equal([], msg_list)
finally
let &more = oldmore
endtry
call assert_fails('message 1', 'E474:')
endfunction
endfunc
" Patch 7.4.1696 defined the "clearmode()" function for clearing the mode
" indicator (e.g., "-- INSERT --") when ":stopinsert" is invoked. Message

View File

@@ -746,6 +746,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
639,
/**/
638,
/**/