summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_breakindent.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-08-12 18:50:36 +0200
committerBram Moolenaar <Bram@vim.org>2020-08-12 18:50:36 +0200
commit6d91bcb4d23b5c6a0be72c384beaf385e2d9d606 (patch)
tree0f4129e5f6e049ce5313520239de270cd9389580 /src/testdir/test_breakindent.vim
parentc3d6e8a46a8fc5de622e8df9dbd25edd03e00c5b (diff)
patch 8.2.1432: various inconsistencies in test filesv8.2.1432
Problem: Various inconsistencies in test files. Solution: Add modelines where they were missing. Use Check commands instead of silently skipping over tests. Adjust indents and comments. (Ken Takata, closes #6695)
Diffstat (limited to 'src/testdir/test_breakindent.vim')
-rw-r--r--src/testdir/test_breakindent.vim80
1 files changed, 20 insertions, 60 deletions
diff --git a/src/testdir/test_breakindent.vim b/src/testdir/test_breakindent.vim
index 30c44f4dd6..42b8c8cf25 100644
--- a/src/testdir/test_breakindent.vim
+++ b/src/testdir/test_breakindent.vim
@@ -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 = [
@@ -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)
@@ -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 = [
@@ -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 = [
@@ -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 = [
@@ -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 = [
@@ -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)
@@ -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)
@@ -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!
@@ -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)
@@ -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)
@@ -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!
@@ -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)
@@ -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')
@@ -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
@@ -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
@@ -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
@@ -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')
@@ -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))
@@ -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))