Skip to content

Commit

Permalink
patch 8.0.0019
Browse files Browse the repository at this point in the history
Problem:    Test_command_count is old style.
Solution:   Turn it into a new style test. (Naruhiko Nishino)
            Use more assert functions.
  • Loading branch information
brammool committed Sep 29, 2016
1 parent b9c31e7 commit b3435b0
Show file tree
Hide file tree
Showing 8 changed files with 206 additions and 198 deletions.
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2028,7 +2028,6 @@ test1 \
test_breakindent \ test_breakindent \
test_changelist \ test_changelist \
test_close_count \ test_close_count \
test_command_count \
test_comparators \ test_comparators \
test_erasebackword \ test_erasebackword \
test_eval \ test_eval \
Expand Down Expand Up @@ -2066,6 +2065,7 @@ test_arglist \
test_channel \ test_channel \
test_charsearch \ test_charsearch \
test_cmdline \ test_cmdline \
test_command_count \
test_crypt \ test_crypt \
test_cscope \ test_cscope \
test_cursor_func \ test_cursor_func \
Expand Down
1 change: 0 additions & 1 deletion src/testdir/Make_all.mak
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ SCRIPTS_ALL = \
test_breakindent.out \ test_breakindent.out \
test_changelist.out \ test_changelist.out \
test_close_count.out \ test_close_count.out \
test_command_count.out \
test_comparators.out \ test_comparators.out \
test_erasebackword.out \ test_erasebackword.out \
test_eval.out \ test_eval.out \
Expand Down
1 change: 1 addition & 0 deletions src/testdir/test_alot.vim
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@


source test_assign.vim source test_assign.vim
source test_autocmd.vim source test_autocmd.vim
source test_command_count.vim
source test_cursor_func.vim source test_cursor_func.vim
source test_delete.vim source test_delete.vim
source test_execute_func.vim source test_execute_func.vim
Expand Down
11 changes: 11 additions & 0 deletions src/testdir/test_autocmd.vim
Original file line number Original file line Diff line number Diff line change
@@ -1,5 +1,13 @@
" Tests for autocommands " Tests for autocommands


function! s:cleanup_buffers() abort
for bnr in range(1, bufnr('$'))
if bufloaded(bnr) && bufnr('%') != bnr
execute 'bd! ' . bnr
endif
endfor
endfunction

func Test_vim_did_enter() func Test_vim_did_enter()
call assert_false(v:vim_did_enter) call assert_false(v:vim_did_enter)


Expand Down Expand Up @@ -254,6 +262,9 @@ endfunc
" Tests for autocommands on :close command. " Tests for autocommands on :close command.
" This used to be in test13. " This used to be in test13.
func Test_three_windows() func Test_three_windows()
" Clean up buffers, because in some cases this function fails.
call s:cleanup_buffers()

" Write three files and open them, each in a window. " Write three files and open them, each in a window.
" Then go to next window, with autocommand that deletes the previous one. " Then go to next window, with autocommand that deletes the previous one.
" Do this twice, writing the file. " Do this twice, writing the file.
Expand Down
158 changes: 0 additions & 158 deletions src/testdir/test_command_count.in

This file was deleted.

38 changes: 0 additions & 38 deletions src/testdir/test_command_count.ok

This file was deleted.

Loading

0 comments on commit b3435b0

Please sign in to comment.