mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 19:06:31 +00:00
Merge pull request #10236 from janlazo/vim-8.1.1545
vim-patch:8.0.{1516,1549},8.1.{0044,1545}
This commit is contained in:
@@ -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"));
|
||||
|
@@ -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.
|
||||
@@ -121,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\+', '', ''))
|
||||
@@ -175,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()
|
||||
|
@@ -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, ...)
|
||||
|
7
src/nvim/testdir/test_assert.vim
Normal file
7
src/nvim/testdir/test_assert.vim
Normal file
@@ -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
|
@@ -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.
|
||||
|
||||
"-------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user