Skip to content

Commit b3435b0

Browse files
committed
patch 8.0.0019
Problem: Test_command_count is old style. Solution: Turn it into a new style test. (Naruhiko Nishino) Use more assert functions.
1 parent b9c31e7 commit b3435b0

8 files changed

Lines changed: 206 additions & 198 deletions

File tree

src/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2028,7 +2028,6 @@ test1 \
20282028
test_breakindent \
20292029
test_changelist \
20302030
test_close_count \
2031-
test_command_count \
20322031
test_comparators \
20332032
test_erasebackword \
20342033
test_eval \
@@ -2066,6 +2065,7 @@ test_arglist \
20662065
test_channel \
20672066
test_charsearch \
20682067
test_cmdline \
2068+
test_command_count \
20692069
test_crypt \
20702070
test_cscope \
20712071
test_cursor_func \

src/testdir/Make_all.mak

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ SCRIPTS_ALL = \
7979
test_breakindent.out \
8080
test_changelist.out \
8181
test_close_count.out \
82-
test_command_count.out \
8382
test_comparators.out \
8483
test_erasebackword.out \
8584
test_eval.out \

src/testdir/test_alot.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
source test_assign.vim
55
source test_autocmd.vim
6+
source test_command_count.vim
67
source test_cursor_func.vim
78
source test_delete.vim
89
source test_execute_func.vim

src/testdir/test_autocmd.vim

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
" Tests for autocommands
22

3+
function! s:cleanup_buffers() abort
4+
for bnr in range(1, bufnr('$'))
5+
if bufloaded(bnr) && bufnr('%') != bnr
6+
execute 'bd! ' . bnr
7+
endif
8+
endfor
9+
endfunction
10+
311
func Test_vim_did_enter()
412
call assert_false(v:vim_did_enter)
513

@@ -254,6 +262,9 @@ endfunc
254262
" Tests for autocommands on :close command.
255263
" This used to be in test13.
256264
func Test_three_windows()
265+
" Clean up buffers, because in some cases this function fails.
266+
call s:cleanup_buffers()
267+
257268
" Write three files and open them, each in a window.
258269
" Then go to next window, with autocommand that deletes the previous one.
259270
" Do this twice, writing the file.

src/testdir/test_command_count.in

Lines changed: 0 additions & 158 deletions
This file was deleted.

src/testdir/test_command_count.ok

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)