Mercurial > vim
comparison src/testdir/test49.vim @ 15406:63b02fcf1361 v8.1.0711
patch 8.1.0711: test files still use function!
commit https://github.com/vim/vim/commit/1e1153600c0377472d62cc553173fe555ddcf5a7
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 9 23:01:02 2019 +0100
patch 8.1.0711: test files still use function!
Problem: Test files still use function!.
Solution: Remove the exclamation mark. Fix overwriting a function.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 09 Jan 2019 23:15:05 +0100 |
parents | e05695e59f6d |
children | f01eb1aed348 |
comparison
equal
deleted
inserted
replaced
15405:3a8785d45112 | 15406:63b02fcf1361 |
---|---|
1 " Vim script language tests | 1 " Vim script language tests |
2 " Author: Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com> | 2 " Author: Servatius Brandt <Servatius.Brandt@fujitsu-siemens.com> |
3 " Last Change: 2016 Feb 07 | 3 " Last Change: 2019 Jan 09 |
4 | 4 |
5 "------------------------------------------------------------------------------- | 5 "------------------------------------------------------------------------------- |
6 " Test environment {{{1 | 6 " Test environment {{{1 |
7 "------------------------------------------------------------------------------- | 7 "------------------------------------------------------------------------------- |
8 | 8 |
316 " | 316 " |
317 let ExtraVimCount = 0 | 317 let ExtraVimCount = 0 |
318 let ExtraVimBase = expand("<sfile>") | 318 let ExtraVimBase = expand("<sfile>") |
319 let ExtraVimTestEnv = "" | 319 let ExtraVimTestEnv = "" |
320 " | 320 " |
321 function! ExtraVim(...) | 321 function ExtraVim(...) |
322 " Count how often this function is called. | 322 " Count how often this function is called. |
323 let g:ExtraVimCount = g:ExtraVimCount + 1 | 323 let g:ExtraVimCount = g:ExtraVimCount + 1 |
324 | 324 |
325 " Disable folds to prevent that the ranges in the ":write" commands below | 325 " Disable folds to prevent that the ranges in the ":write" commands below |
326 " are extended up to the end of a closed fold. This also speeds things up | 326 " are extended up to the end of a closed fold. This also speeds things up |
498 " | 498 " |
499 " Evaluates v:throwpoint and returns the throwpoint relative to the beginning of | 499 " Evaluates v:throwpoint and returns the throwpoint relative to the beginning of |
500 " an ExtraVim script as passed by ExtraVim() in ExtraVimBegin. | 500 " an ExtraVim script as passed by ExtraVim() in ExtraVimBegin. |
501 " | 501 " |
502 " EXTRA_VIM_START - do not change or remove this line. | 502 " EXTRA_VIM_START - do not change or remove this line. |
503 function! ExtraVimThrowpoint() | 503 function ExtraVimThrowpoint() |
504 if !exists("g:ExtraVimBegin") | 504 if !exists("g:ExtraVimBegin") |
505 Xout "ExtraVimThrowpoint() used outside ExtraVim() script." | 505 Xout "ExtraVimThrowpoint() used outside ExtraVim() script." |
506 return v:throwpoint | 506 return v:throwpoint |
507 endif | 507 endif |
508 | 508 |
528 " | 528 " |
529 " In order to execute a function specifying an INTERRUPT location (see ExtraVim) | 529 " In order to execute a function specifying an INTERRUPT location (see ExtraVim) |
530 " as a script file, use ExecAsScript below. | 530 " as a script file, use ExecAsScript below. |
531 " | 531 " |
532 " EXTRA_VIM_START - do not change or remove this line. | 532 " EXTRA_VIM_START - do not change or remove this line. |
533 function! MakeScript(funcname, ...) | 533 function MakeScript(funcname, ...) |
534 let script = tempname() | 534 let script = tempname() |
535 execute "redir! >" . script | 535 execute "redir! >" . script |
536 execute "function" a:funcname | 536 execute "function" a:funcname |
537 redir END | 537 redir END |
538 execute "edit" script | 538 execute "edit" script |
566 " | 566 " |
567 " When inside ":if ExtraVim()", add a file breakpoint for each INTERRUPT | 567 " When inside ":if ExtraVim()", add a file breakpoint for each INTERRUPT |
568 " location specified in the function. | 568 " location specified in the function. |
569 " | 569 " |
570 " EXTRA_VIM_START - do not change or remove this line. | 570 " EXTRA_VIM_START - do not change or remove this line. |
571 function! ExecAsScript(funcname) | 571 function ExecAsScript(funcname) |
572 " Make a script from the function passed as argument. | 572 " Make a script from the function passed as argument. |
573 let script = MakeScript(a:funcname) | 573 let script = MakeScript(a:funcname) |
574 | 574 |
575 " When running in an extra Vim process, add a file breakpoint for each | 575 " When running in an extra Vim process, add a file breakpoint for each |
576 " function breakpoint set when the extra Vim process was invoked by | 576 " function breakpoint set when the extra Vim process was invoked by |
8546 return match | 8546 return match |
8547 endfunction | 8547 endfunction |
8548 | 8548 |
8549 " Remove the autocommands for the events specified as arguments in all used | 8549 " Remove the autocommands for the events specified as arguments in all used |
8550 " autogroups. | 8550 " autogroups. |
8551 function! Delete_autocommands(...) | 8551 function Delete_autocommands(...) |
8552 let augfile = tempname() | 8552 let augfile = tempname() |
8553 while 1 | 8553 while 1 |
8554 try | 8554 try |
8555 exec "redir >" . augfile | 8555 exec "redir >" . augfile |
8556 aug | 8556 aug |