Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/testdir/test_arglist.vim
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ endfunc

func Test_args_with_quote()
" Only on Unix can a file name include a double quote.
if has('unix')
args \"foobar
call assert_equal('"foobar', argv(0))
%argdelete
endif
CheckUnix

args \"foobar
call assert_equal('"foobar', argv(0))
%argdelete
endfunc

" Test for 0argadd and 0argedit
Expand Down
2 changes: 2 additions & 0 deletions src/testdir/test_assert.vim
Original file line number Diff line number Diff line change
Expand Up @@ -374,3 +374,5 @@ func Test_zz_quit_detected()
" Verify that if a test function ends Vim the test script detects this.
quit
endfunc

" vim: shiftwidth=2 sts=2 expandtab
2 changes: 2 additions & 0 deletions src/testdir/test_autochdir.vim
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ func Test_set_filename()
call chdir(cwd)
call delete('samples/Xtest')
endfunc

" vim: shiftwidth=2 sts=2 expandtab
28 changes: 10 additions & 18 deletions src/testdir/test_autocmd.vim
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,7 @@ if has('timers')
endfunc

func Test_cursorhold_insert_with_timer_interrupt()
if !has('job')
return
endif
CheckFeature job
" Need to move the cursor.
call feedkeys("ggG", "xt")

Expand Down Expand Up @@ -535,9 +533,7 @@ func s:AutoCommandOptionSet(match)
endfunc

func Test_OptionSet()
if !has("eval") || !exists("+autochdir")
return
endif
CheckOption autochdir

badd test_autocmd.vim

Expand Down Expand Up @@ -1778,12 +1774,11 @@ func Test_nocatch_wipe_all_buffers()
endfunc

func Test_nocatch_wipe_dummy_buffer()
if has('quickfix')
" Nasty autocommand: wipe buffer on any event.
au * x bwipe
call assert_fails('lv½ /x', 'E937')
au!
endif
CheckFeature quickfix
" Nasty autocommand: wipe buffer on any event.
au * x bwipe
call assert_fails('lv½ /x', 'E937')
au!
endfunc

function s:Before_test_dirchanged()
Expand Down Expand Up @@ -1834,9 +1829,7 @@ function Test_dirchanged_local()
endfunc

function Test_dirchanged_auto()
if !exists('+autochdir')
return
endif
CheckOption autochdir
call s:Before_test_dirchanged()
call test_autochdir()
autocmd test_dirchanged DirChanged auto call add(s:li, "auto:")
Expand Down Expand Up @@ -2087,9 +2080,8 @@ endfunc
" - FileReadPost decompress the file
func Test_ReadWrite_Autocmds()
" Run this test only on Unix-like systems and if gzip is available
if !has('unix') || !executable("gzip")
return
endif
CheckUnix
CheckExecutable gzip

" Make $GZIP empty, "-v" would cause trouble.
let $GZIP = ""
Expand Down
2 changes: 2 additions & 0 deletions src/testdir/test_autoload.vim
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ func Test_autoload_vim9script()
call assert_equal('some', auto9#getsome())
call assert_equal(49, auto9#add42(7))
endfunc

" vim: shiftwidth=2 sts=2 expandtab
2 changes: 2 additions & 0 deletions src/testdir/test_balloon.vim
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,5 @@ func Test_balloon_eval_term_visual()
call StopVimInTerminal(buf)
call delete('XTest_beval_visual')
endfunc

" vim: shiftwidth=2 sts=2 expandtab
2 changes: 2 additions & 0 deletions src/testdir/test_balloon_gui.vim
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ func Test_balloon_show_gui()
sleep 10m
call balloon_show('')
endfunc

" vim: shiftwidth=2 sts=2 expandtab
2 changes: 2 additions & 0 deletions src/testdir/test_behave.vim
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@ endfunc
func Test_behave_error()
call assert_fails('behave x', 'E475:')
endfunc

" vim: shiftwidth=2 sts=2 expandtab
1 change: 0 additions & 1 deletion src/testdir/test_blockedit.vim
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
" Test for block inserting
"

func Test_blockinsert_indent()
new
Expand Down
80 changes: 20 additions & 60 deletions src/testdir/test_breakindent.vim
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ endfunc

func Test_breakindent01_vartabs()
" like 01 but with vartabs feature
if !has("vartabs")
return
endif
CheckFeature vartabs
call s:test_windows('setl briopt=min:0 vts=4')
let lines = s:screen_lines(line('.'),8)
let expect = [
Expand All @@ -75,9 +73,7 @@ func Test_breakindent02()
endfunc

func Test_breakindent02_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
" simple breakindent test with showbreak set
call s:test_windows('setl briopt=min:0 sbr=>> vts=4')
let lines = s:screen_lines(line('.'),8)
Expand Down Expand Up @@ -106,9 +102,7 @@ endfunc

func Test_breakindent03_vartabs()
" simple breakindent test with showbreak set and briopt including sbr
if !has("vartabs")
return
endif
CheckFeature vartabs
call s:test_windows('setl briopt=sbr,min:0 sbr=++ vts=4')
let lines = s:screen_lines(line('.'),8)
let expect = [
Expand Down Expand Up @@ -139,9 +133,7 @@ endfunc

func Test_breakindent04_vartabs()
" breakindent set with min width 18
if !has("vartabs")
return
endif
CheckFeature vartabs
call s:test_windows('setl sbr= briopt=min:18 vts=4')
let lines = s:screen_lines(line('.'),8)
let expect = [
Expand Down Expand Up @@ -169,9 +161,7 @@ endfunc

func Test_breakindent05_vartabs()
" breakindent set and shift by 2
if !has("vartabs")
return
endif
CheckFeature vartabs
call s:test_windows('setl briopt=shift:2,min:0 vts=4')
let lines = s:screen_lines(line('.'),8)
let expect = [
Expand All @@ -198,9 +188,7 @@ endfunc

func Test_breakindent06_vartabs()
" breakindent set and shift by -1
if !has("vartabs")
return
endif
CheckFeature vartabs
call s:test_windows('setl briopt=shift:-1,min:0 vts=4')
let lines = s:screen_lines(line('.'),8)
let expect = [
Expand All @@ -227,9 +215,7 @@ func Test_breakindent07()
endfunc

func Test_breakindent07_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
" breakindent set and shift by 1, Number set sbr=? and briopt:sbr
call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 cpo+=n vts=4')
let lines = s:screen_lines(line('.'),10)
Expand Down Expand Up @@ -258,9 +244,7 @@ func Test_breakindent07a()
endfunc

func Test_breakindent07a_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
" breakindent set and shift by 1, Number set sbr=? and briopt:sbr
call s:test_windows('setl briopt=shift:1,sbr,min:0 nu sbr=? nuw=4 vts=4')
let lines = s:screen_lines(line('.'),10)
Expand Down Expand Up @@ -293,9 +277,7 @@ func Test_breakindent08()
endfunc

func Test_breakindent08_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
" breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr
call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list cpo+=n ts=4 vts=4')
" make sure, cache is invalidated!
Expand Down Expand Up @@ -327,9 +309,7 @@ func Test_breakindent08a()
endfunc

func Test_breakindent08a_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
" breakindent set and shift by 1, Number and list set sbr=# and briopt:sbr
call s:test_windows('setl briopt=shift:1,sbr,min:0 nu nuw=4 sbr=# list vts=4')
let lines = s:screen_lines(line('.'),10)
Expand All @@ -356,9 +336,7 @@ func Test_breakindent09()
endfunc

func Test_breakindent09_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
" breakindent set and shift by 1, Number and list set sbr=#
call s:test_windows('setl briopt=shift:1,min:0 nu nuw=4 sbr=# list vts=4')
let lines = s:screen_lines(line('.'),10)
Expand Down Expand Up @@ -390,9 +368,7 @@ func Test_breakindent10()
endfunc

func Test_breakindent10_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
" breakindent set, Number set sbr=~
call s:test_windows('setl cpo+=n sbr=~ nu nuw=4 nolist briopt=sbr,min:0 vts=4')
" make sure, cache is invalidated!
Expand Down Expand Up @@ -421,9 +397,7 @@ func Test_breakindent11()
endfunc

func Test_breakindent11_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
" test strdisplaywidth()
call s:test_windows('setl cpo-=n sbr=>> nu nuw=4 nolist briopt= ts=4 vts=4')
let text = getline(2)
Expand All @@ -447,9 +421,7 @@ func Test_breakindent12()
endfunc

func Test_breakindent12_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
" test breakindent with long indent
let s:input = "\t\t\t\t\t{"
call s:test_windows('setl breakindent linebreak briopt=min:10 nu numberwidth=3 ts=4 list listchars=tab:>- vts=4')
Expand Down Expand Up @@ -478,9 +450,7 @@ func Test_breakindent13()
endfunc

func Test_breakindent13_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
let s:input = ""
call s:test_windows('setl breakindent briopt=min:10 ts=8 vts=8')
vert resize 20
Expand Down Expand Up @@ -512,9 +482,7 @@ func Test_breakindent14()
endfunc

func Test_breakindent14_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
let s:input = ""
call s:test_windows('setl breakindent briopt= ts=8 vts=8')
vert resize 30
Expand Down Expand Up @@ -548,9 +516,7 @@ func Test_breakindent15()
endfunc

func Test_breakindent15_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
let s:input = ""
call s:test_windows('setl breakindent briopt= ts=8 sw=8 vts=8')
vert resize 30
Expand Down Expand Up @@ -592,9 +558,7 @@ func Test_breakindent16()
endfunc

func Test_breakindent16_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
" Check that overlong lines are indented correctly.
let s:input = ""
call s:test_windows('setl breakindent briopt=min:0 ts=4 vts=4')
Expand All @@ -620,9 +584,7 @@ func Test_breakindent16_vartabs()
endfunc

func Test_breakindent17_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
let s:input = ""
call s:test_windows('setl breakindent list listchars=tab:<-> showbreak=+++')
call setline(1, "\t" . repeat('a', 63))
Expand All @@ -640,9 +602,7 @@ func Test_breakindent17_vartabs()
endfunc

func Test_breakindent18_vartabs()
if !has("vartabs")
return
endif
CheckFeature vartabs
let s:input = ""
call s:test_windows('setl breakindent list listchars=tab:<->')
call setline(1, "\t" . repeat('a', 63))
Expand Down
2 changes: 2 additions & 0 deletions src/testdir/test_bufline.vim
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,5 @@ func Test_appendbufline_redraw()
call StopVimInTerminal(buf)
call delete('XscriptMatchCommon')
endfunc

" vim: shiftwidth=2 sts=2 expandtab
3 changes: 3 additions & 0 deletions src/testdir/test_bufwintabinfo.vim
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
" Tests for the getbufinfo(), getwininfo() and gettabinfo() functions

source check.vim

func Test_getbufwintabinfo()
Expand Down Expand Up @@ -168,3 +169,5 @@ func Test_getbufinfo_lines()
edit Xfoo
bw!
endfunc

" vim: shiftwidth=2 sts=2 expandtab
2 changes: 2 additions & 0 deletions src/testdir/test_cd.vim
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,5 @@ func Test_cd_completion()
call delete('XComplDir2', 'd')
call delete('XComplFile')
endfunc

" vim: shiftwidth=2 sts=2 expandtab
2 changes: 2 additions & 0 deletions src/testdir/test_changedtick.vim
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,5 @@ func Test_changedtick_not_incremented_with_write()
bwipe
call delete(fname)
endfunc

" vim: shiftwidth=2 sts=2 expandtab
6 changes: 3 additions & 3 deletions src/testdir/test_changelist.vim
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
" Tests for the changelist functionality

source check.vim

" Tests for the getchangelist() function
func Test_getchangelist()
if !has("jumplist")
return
endif
CheckFeature jumplist

bwipe!
enew
Expand Down
4 changes: 1 addition & 3 deletions src/testdir/test_channel.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1348,9 +1348,7 @@ endfunction
" This caused a crash, because messages were handled while peeking for a
" character.
func Test_exit_cb_wipes_buf()
if !has('timers')
return
endif
CheckFeature timers
set cursorline lazyredraw
call test_override('redraw_flag', 1)
new
Expand Down
Loading