Skip to content

Commit 9134f1e

Browse files
committed
patch 8.1.2358: tests fail on Cirrus CI for FreeBSD
Problem: Tests fail on Cirrus CI for FreeBSD. Solution: Fix a test and skip some. (Christian Brabandt, closes #5281)
1 parent 68e9e5f commit 9134f1e

9 files changed

Lines changed: 28 additions & 5 deletions

File tree

.cirrus.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
env:
2-
#CIRRUS_CLONE_DEPTH: 1
2+
CIRRUS_CLONE_DEPTH: 3
33
FEATURES: huge
44

55
freebsd_12_task:
@@ -13,4 +13,5 @@ freebsd_12_task:
1313
- make -j${NPROC}
1414
- src/vim --version
1515
test_script:
16-
- make test
16+
# Runtime Indent tests do not work, run only the normal test suite
17+
- cd src && make test

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ SRC_ALL = \
88
.hgignore \
99
.lgtm.yml \
1010
.travis.yml \
11+
.cirrus.yml \
1112
appveyor.yml \
1213
ci/appveyor.bat \
1314
src/Make_all.mak \

src/testdir/check.vim

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,15 @@ func CheckUnix()
6464
endif
6565
endfunc
6666

67+
" Command to check for not running on a BSD system.
68+
" TODO: using this checks should not be needed
69+
command CheckNotBSD call CheckNotBSD()
70+
func CheckNotBSD()
71+
if has('bsd')
72+
throw 'Skipped: does not work on BSD'
73+
endif
74+
endfunc
75+
6776
" Command to check that making screendumps is supported.
6877
" Caller must source screendump.vim
6978
command CheckScreendump call CheckScreendump()

src/testdir/test_normal.vim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,8 @@ func Test_normal23_K()
12041204
return
12051205
endif
12061206

1207-
if has('mac') || has('bsd')
1207+
let not_gnu_man = has('mac') || has('bsd')
1208+
if not_gnu_man
12081209
" In MacOS and BSD, the option for specifying a pager is different
12091210
set keywordprg=man\ -P\ cat
12101211
else
@@ -1213,7 +1214,7 @@ func Test_normal23_K()
12131214
" Test for using man
12141215
2
12151216
let a = execute('unsilent norm! K')
1216-
if has('mac')
1217+
if not_gnu_man
12171218
call assert_match("man -P cat 'man'", a)
12181219
else
12191220
call assert_match("man --pager=cat 'man'", a)

src/testdir/test_quickfix.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,7 @@ func s:create_test_file(filename)
16851685
endfunc
16861686

16871687
func Test_switchbuf()
1688+
CheckNotBSD
16881689
call s:create_test_file('Xqftestfile1')
16891690
call s:create_test_file('Xqftestfile2')
16901691
call s:create_test_file('Xqftestfile3')

src/testdir/test_source_utf8.vim

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
" Test the :source! command
2+
source check.vim
23

34
func Test_source_utf8()
45
" check that sourcing a script with 0x80 as second byte works
6+
" does not work correctly on BSD
7+
CheckNotBSD
58
new
69
call setline(1, [':%s/àx/--à1234--/g', ':%s/Àx/--À1234--/g'])
710
write! Xscript
@@ -31,6 +34,7 @@ endfunc
3134

3235
" Test for sourcing a file with CTRL-V's at the end of the line
3336
func Test_source_ctrl_v()
37+
CheckNotBSD
3438
call writefile(['map __1 afirst',
3539
\ 'map __2 asecond',
3640
\ 'map __3 athird',

src/testdir/test_terminal.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,7 @@ func Test_terminal_wqall()
870870
endfunc
871871

872872
func Test_terminal_composing_unicode()
873+
CheckNotBSD
873874
let save_enc = &encoding
874875
set encoding=utf-8
875876

src/testdir/test_utf8_comparisons.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ endfunc
8686
" test that g~ap changes one paragraph only.
8787
func Test_gap()
8888
new
89-
call feedkeys("iabcd\n\ndefggg0g~ap", "tx")
89+
" setup text
90+
call feedkeys("iabcd\<cr>\<cr>defg", "tx")
91+
" modify only first line
92+
call feedkeys("gg0g~ap", "tx")
9093
call assert_equal(["ABCD", "", "defg"], getline(1,3))
9194
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,8 @@ static char *(features[]) =
737737

738738
static int included_patches[] =
739739
{ /* Add new patch number below this line */
740+
/**/
741+
2358,
740742
/**/
741743
2357,
742744
/**/

0 commit comments

Comments
 (0)