From 1abfeff97840992b3fc85d72e917ecde1acbb781 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 15 Jun 2019 20:24:38 -0400 Subject: vim-patch:8.1.1545: when the screen is to small there is no message about that Problem: When the screen is to small there is no message about that. (Daniel Hahler) Solution: Do not use :cquit. (closes vim/vim#4534) https://github.com/vim/vim/commit/45aa07d3c126e887c614f8a4ebdb88aed673a9f1 --- src/nvim/testdir/runtest.vim | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index 65329b58f8..e0d73c5a1e 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -35,8 +35,11 @@ if &lines < 24 || &columns < 80 echoerr error split test.log $put =error - w - cquit + write + split messages + call append(line('$'), error) + write + qa! endif " Common with all tests on all systems. -- cgit From c6c5754a86e091bce0e8d5342576bd96b5cc275f Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 15 Jun 2019 20:52:27 -0400 Subject: vim-patch:8.1.0044: if a test function exists Vim this may go unnoticed Problem: If a test function exists Vim this may go unnoticed. Solution: Check for a test funtion quitting Vim. Fix tests that did exit Vim. https://github.com/vim/vim/commit/8903676d3d4c3fcb37d2a55c67370f30806b1626 Restore test_assert.vim to run Test_zz_quit_detected(). --- src/nvim/testdir/runtest.vim | 12 ++++++++++++ src/nvim/testdir/test_assert.vim | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 src/nvim/testdir/test_assert.vim (limited to 'src') diff --git a/src/nvim/testdir/runtest.vim b/src/nvim/testdir/runtest.vim index e0d73c5a1e..6f039509f3 100644 --- a/src/nvim/testdir/runtest.vim +++ b/src/nvim/testdir/runtest.vim @@ -124,7 +124,10 @@ func RunTheTest(test) exe 'call ' . a:test else try + let s:test = a:test + au VimLeavePre * call EarlyExit(s:test) exe 'call ' . a:test + au! VimLeavePre catch /^\cskipped/ call add(s:messages, ' Skipped') call add(s:skipped, 'SKIPPED ' . a:test . ': ' . substitute(v:exception, '^\S*\s\+', '', '')) @@ -178,6 +181,15 @@ func AfterTheTest() endif endfunc +func EarlyExit(test) + " It's OK for the test we use to test the quit detection. + if a:test != 'Test_zz_quit_detected()' + call add(v:errors, 'Test caused Vim to exit: ' . a:test) + endif + + call FinishTesting() +endfunc + " This function can be called by a test if it wants to abort testing. func FinishTesting() call AfterTheTest() diff --git a/src/nvim/testdir/test_assert.vim b/src/nvim/testdir/test_assert.vim new file mode 100644 index 0000000000..fe87bd6ef5 --- /dev/null +++ b/src/nvim/testdir/test_assert.vim @@ -0,0 +1,7 @@ +" Test that the methods used for testing work. + +" Must be last. +func Test_zz_quit_detected() + " Verify that if a test function ends Vim the test script detects this. + quit +endfunc -- cgit From b837c5657608a0bd4e1ca5dd86ffb8786e037cfa Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 15 Jun 2019 22:09:32 -0400 Subject: vim-patch:8.0.1516: errors for job options are not very specific Problem: Errors for job options are not very specific. Solution: Add more specific error messages. https://github.com/vim/vim/commit/b3292fa2d362b064ff8a115fc0ad794c1f1265d7 --- src/nvim/globals.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/nvim/globals.h b/src/nvim/globals.h index 5624d38bad..4fce02613c 100644 --- a/src/nvim/globals.h +++ b/src/nvim/globals.h @@ -938,6 +938,9 @@ EXTERN char_u e_interr[] INIT(= N_("Interrupted")); EXTERN char_u e_invaddr[] INIT(= N_("E14: Invalid address")); EXTERN char_u e_invarg[] INIT(= N_("E474: Invalid argument")); EXTERN char_u e_invarg2[] INIT(= N_("E475: Invalid argument: %s")); +EXTERN char_u e_invargval[] INIT(= N_("E475: Invalid value for argument %s")); +EXTERN char_u e_invargNval[] INIT(= N_( + "E475: Invalid value for argument %s: %s")); EXTERN char_u e_duparg2[] INIT(= N_("E983: Duplicate argument: %s")); EXTERN char_u e_invexpr2[] INIT(= N_("E15: Invalid expression: %s")); EXTERN char_u e_invrange[] INIT(= N_("E16: Invalid range")); -- cgit From cb01925eb4cd117475c48b1724c8e6853ba59e83 Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 15 Jun 2019 22:23:56 -0400 Subject: vim-patch:8.0.1549: various small problems in test files Problem: Various small problems in test files. Solution: Include small changes. https://github.com/vim/vim/commit/5d7ead3bc85eefd0929bfcbb579510c8164ea1be --- src/nvim/testdir/shared.vim | 2 ++ src/nvim/testdir/test_vimscript.vim | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/nvim/testdir/shared.vim b/src/nvim/testdir/shared.vim index 5dea33e2ac..ac34dec569 100644 --- a/src/nvim/testdir/shared.vim +++ b/src/nvim/testdir/shared.vim @@ -134,6 +134,8 @@ func s:kill_server(cmd) endfunc " Wait for up to a second for "expr" to become true. +" A second argument can be used to specify a different timeout in msec. +" " 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, ...) diff --git a/src/nvim/testdir/test_vimscript.vim b/src/nvim/testdir/test_vimscript.vim index 05abf04d65..d0ecbef7e1 100644 --- a/src/nvim/testdir/test_vimscript.vim +++ b/src/nvim/testdir/test_vimscript.vim @@ -1,4 +1,4 @@ -" Test various aspects of the Vim language. +" Test various aspects of the Vim script language. " Most of this was formerly in test49. "------------------------------------------------------------------------------- -- cgit