Merge #10918 from janlazo/vim-8.0.1697

vim-patch:8.0.{1697,1729}
This commit is contained in:
Justin M. Keyes 2019-09-02 11:28:12 -07:00 committed by GitHub
commit d3c17d50d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 17 additions and 17 deletions

View File

@ -3366,15 +3366,15 @@ static int pattern_match(char_u *pat, char_u *text, int ic)
* types for expressions. * types for expressions.
*/ */
typedef enum { typedef enum {
TYPE_UNKNOWN = 0 TYPE_UNKNOWN = 0,
, TYPE_EQUAL /* == */ TYPE_EQUAL, // ==
, TYPE_NEQUAL /* != */ TYPE_NEQUAL, // !=
, TYPE_GREATER /* > */ TYPE_GREATER, // >
, TYPE_GEQUAL /* >= */ TYPE_GEQUAL, // >=
, TYPE_SMALLER /* < */ TYPE_SMALLER, // <
, TYPE_SEQUAL /* <= */ TYPE_SEQUAL, // <=
, TYPE_MATCH /* =~ */ TYPE_MATCH, // =~
, TYPE_NOMATCH /* !~ */ TYPE_NOMATCH, // !~
} exptype_T; } exptype_T;
// TODO(ZyX-I): move to eval/expressions // TODO(ZyX-I): move to eval/expressions

View File

@ -94,7 +94,7 @@ typedef enum
{ {
ET_USER, // exception caused by ":throw" command ET_USER, // exception caused by ":throw" command
ET_ERROR, // error exception ET_ERROR, // error exception
ET_INTERRUPT // interrupt exception triggered by Ctrl-C ET_INTERRUPT, // interrupt exception triggered by Ctrl-C
} except_type_T; } except_type_T;
/* /*

View File

@ -133,7 +133,7 @@ func s:kill_server(cmd)
endif endif
endfunc endfunc
" Wait for up to a second for "expr" to become true. "expr" can be a " Wait for up to five seconds for "expr" to become true. "expr" can be a
" stringified expression to evaluate, or a funcref without arguments. " stringified expression to evaluate, or a funcref without arguments.
" "
" A second argument can be used to specify a different timeout in msec. " A second argument can be used to specify a different timeout in msec.
@ -141,7 +141,7 @@ endfunc
" Return time slept in milliseconds. With the +reltime feature this can be " Return time slept in milliseconds. With the +reltime feature this can be
" more than the actual waiting time. Without +reltime it can also be less. " more than the actual waiting time. Without +reltime it can also be less.
func WaitFor(expr, ...) func WaitFor(expr, ...)
let timeout = get(a:000, 0, 1000) let timeout = get(a:000, 0, 5000)
" using reltime() is more accurate, but not always available " using reltime() is more accurate, but not always available
if has('reltime') if has('reltime')
let start = reltime() let start = reltime()

View File

@ -32,7 +32,7 @@ func Test_client_server()
" Takes a short while for the server to be active. " Takes a short while for the server to be active.
" When using valgrind it takes much longer. " When using valgrind it takes much longer.
call WaitFor('serverlist() =~ "' . name . '"', 5000) call WaitFor('serverlist() =~ "' . name . '"')
call assert_match(name, serverlist()) call assert_match(name, serverlist())
call remote_foreground(name) call remote_foreground(name)

View File

@ -74,20 +74,20 @@ func Do_test_quotestar_for_x11()
" by the server. " by the server.
let @* = 'no' let @* = 'no'
call remote_foreground(name) call remote_foreground(name)
call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "no"', 3000) call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "no"')
" Set the * register on the server. " Set the * register on the server.
call remote_send(name, ":let @* = 'yes'\<CR>") call remote_send(name, ":let @* = 'yes'\<CR>")
call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"', 3000) call WaitFor('remote_expr("' . name . '", "@*", "", 1) == "yes"')
" Check that the *-register of this vim instance is changed as expected. " Check that the *-register of this vim instance is changed as expected.
call WaitFor('@* == "yes"', 3000) call WaitFor('@* == "yes"')
" Handle the large selection over 262040 byte. " Handle the large selection over 262040 byte.
let length = 262044 let length = 262044
let sample = 'a' . repeat('b', length - 2) . 'c' let sample = 'a' . repeat('b', length - 2) . 'c'
let @* = sample let @* = sample
call WaitFor('remote_expr("' . name . '", "len(@*) >= ' . length . '", "", 1)', 3000) call WaitFor('remote_expr("' . name . '", "len(@*) >= ' . length . '", "", 1)')
let res = remote_expr(name, "@*", "", 2) let res = remote_expr(name, "@*", "", 2)
call assert_equal(length, len(res)) call assert_equal(length, len(res))
" Check length to prevent a large amount of output at assertion failure. " Check length to prevent a large amount of output at assertion failure.