From 55c66d6c19ae46a0f6590be93a9692c2cb4f10e4 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 2 Sep 2019 11:59:10 -0400 Subject: vim-patch:8.0.1697: various tests are still a bit flaky Problem: Various tests are still a bit flaky. Solution: Increase the default wait time to five seconds. https://github.com/vim/vim/commit/769e9d21ac3e8dff43b9ef5e46cdc4523833b51e --- src/nvim/testdir/shared.vim | 4 ++-- src/nvim/testdir/test_clientserver.vim | 2 +- src/nvim/testdir/test_quotestar.vim | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/nvim/testdir/shared.vim b/src/nvim/testdir/shared.vim index bcd6d021a0..df512e2e3f 100644 --- a/src/nvim/testdir/shared.vim +++ b/src/nvim/testdir/shared.vim @@ -133,7 +133,7 @@ func s:kill_server(cmd) endif 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. " " 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 " more than the actual waiting time. Without +reltime it can also be less. 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 if has('reltime') let start = reltime() diff --git a/src/nvim/testdir/test_clientserver.vim b/src/nvim/testdir/test_clientserver.vim index f03a6903c1..813cb338a5 100644 --- a/src/nvim/testdir/test_clientserver.vim +++ b/src/nvim/testdir/test_clientserver.vim @@ -32,7 +32,7 @@ func Test_client_server() " Takes a short while for the server to be active. " When using valgrind it takes much longer. - call WaitFor('serverlist() =~ "' . name . '"', 5000) + call WaitFor('serverlist() =~ "' . name . '"') call assert_match(name, serverlist()) call remote_foreground(name) diff --git a/src/nvim/testdir/test_quotestar.vim b/src/nvim/testdir/test_quotestar.vim index 3a8fdef3a3..b83fbe40e8 100644 --- a/src/nvim/testdir/test_quotestar.vim +++ b/src/nvim/testdir/test_quotestar.vim @@ -74,20 +74,20 @@ func Do_test_quotestar_for_x11() " by the server. let @* = 'no' 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. call remote_send(name, ":let @* = 'yes'\") - 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. - call WaitFor('@* == "yes"', 3000) + call WaitFor('@* == "yes"') " Handle the large selection over 262040 byte. let length = 262044 let sample = 'a' . repeat('b', length - 2) . 'c' 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) call assert_equal(length, len(res)) " Check length to prevent a large amount of output at assertion failure. -- cgit From 4a608180714eb1ea7bfd07a083b314cc3324f5b7 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Mon, 2 Sep 2019 12:11:45 -0400 Subject: vim-patch:8.0.1729: no comma after last enum item Problem: No comma after last enum item. Solution: Add a few commas to check if this works for all compilers. Also add a few // comments. https://github.com/vim/vim/commit/ea3ece405ab55f44018257bd2f5021231af8e87f --- src/nvim/eval.c | 18 +++++++++--------- src/nvim/ex_eval.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'src') diff --git a/src/nvim/eval.c b/src/nvim/eval.c index 79e67f6d7b..683d44a245 100644 --- a/src/nvim/eval.c +++ b/src/nvim/eval.c @@ -3366,15 +3366,15 @@ static int pattern_match(char_u *pat, char_u *text, int ic) * types for expressions. */ typedef enum { - TYPE_UNKNOWN = 0 - , TYPE_EQUAL /* == */ - , TYPE_NEQUAL /* != */ - , TYPE_GREATER /* > */ - , TYPE_GEQUAL /* >= */ - , TYPE_SMALLER /* < */ - , TYPE_SEQUAL /* <= */ - , TYPE_MATCH /* =~ */ - , TYPE_NOMATCH /* !~ */ + TYPE_UNKNOWN = 0, + TYPE_EQUAL, // == + TYPE_NEQUAL, // != + TYPE_GREATER, // > + TYPE_GEQUAL, // >= + TYPE_SMALLER, // < + TYPE_SEQUAL, // <= + TYPE_MATCH, // =~ + TYPE_NOMATCH, // !~ } exptype_T; // TODO(ZyX-I): move to eval/expressions diff --git a/src/nvim/ex_eval.h b/src/nvim/ex_eval.h index d5f8737bf3..2237b6aca3 100644 --- a/src/nvim/ex_eval.h +++ b/src/nvim/ex_eval.h @@ -94,7 +94,7 @@ typedef enum { ET_USER, // exception caused by ":throw" command ET_ERROR, // error exception - ET_INTERRUPT // interrupt exception triggered by Ctrl-C + ET_INTERRUPT, // interrupt exception triggered by Ctrl-C } except_type_T; /* -- cgit