]> granicus.if.org Git - vim/commitdiff
patch 8.1.2358: tests fail on Cirrus CI for FreeBSD v8.1.2358
authorBram Moolenaar <Bram@vim.org>
Fri, 29 Nov 2019 19:26:13 +0000 (20:26 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 29 Nov 2019 19:26:13 +0000 (20:26 +0100)
Problem:    Tests fail on Cirrus CI for FreeBSD.
Solution:   Fix a test and skip some. (Christian Brabandt, closes #5281)

.cirrus.yml
Filelist
src/testdir/check.vim
src/testdir/test_normal.vim
src/testdir/test_quickfix.vim
src/testdir/test_source_utf8.vim
src/testdir/test_terminal.vim
src/testdir/test_utf8_comparisons.vim
src/version.c

index 2aae80e39992bb8745f63fd22bd1435bbad49ca0..907d10eb4e0a97806578e045b5b6fe72e9d5b9cd 100644 (file)
@@ -1,5 +1,5 @@
 env:
-  #CIRRUS_CLONE_DEPTH: 1
+  CIRRUS_CLONE_DEPTH: 3
   FEATURES: huge
 
 freebsd_12_task:
@@ -13,4 +13,5 @@ freebsd_12_task:
     - make -j${NPROC}
     - src/vim --version
   test_script:
-    - make test
+    # Runtime Indent tests do not work, run only the normal test suite
+    - cd src && make test
index 604ff06eb6035d13fcd1277dfb78ca65080b8d92..b39eb6593f8d86d23ad62eada2289a944cc79ed8 100644 (file)
--- a/Filelist
+++ b/Filelist
@@ -8,6 +8,7 @@ SRC_ALL =       \
                .hgignore \
                .lgtm.yml \
                .travis.yml \
+               .cirrus.yml \
                appveyor.yml \
                ci/appveyor.bat \
                src/Make_all.mak \
index 6c3b1be4ff1608ede13dfad8c061dfcfff72ce7f..30c415821ffeb3ede7f41cd9dbcaf25f19d2c95d 100644 (file)
@@ -64,6 +64,15 @@ func CheckUnix()
   endif
 endfunc
 
+" Command to check for not running on a BSD system.
+" TODO: using this checks should not be needed
+command CheckNotBSD call CheckNotBSD()
+func CheckNotBSD()
+  if has('bsd')
+    throw 'Skipped: does not work on BSD'
+  endif
+endfunc
+
 " Command to check that making screendumps is supported.
 " Caller must source screendump.vim
 command CheckScreendump call CheckScreendump()
index bbb999386663de54e0491e033cfee2dd2109369f..a28a82540ae5d612684c559206cecac62291d0f2 100644 (file)
@@ -1204,7 +1204,8 @@ func Test_normal23_K()
     return
   endif
 
-  if has('mac') || has('bsd')
+  let not_gnu_man = has('mac') || has('bsd')
+  if not_gnu_man
     " In MacOS and BSD, the option for specifying a pager is different
     set keywordprg=man\ -P\ cat
   else
@@ -1213,7 +1214,7 @@ func Test_normal23_K()
   " Test for using man
   2
   let a = execute('unsilent norm! K')
-  if has('mac')
+  if not_gnu_man
     call assert_match("man -P cat 'man'", a)
   else
     call assert_match("man --pager=cat 'man'", a)
index 3a9e6720ec5b0bd3b7f076b259154f8804b622ef..d31650f2632aaf09db3385e4f65dc5446aabc3a5 100644 (file)
@@ -1685,6 +1685,7 @@ func s:create_test_file(filename)
 endfunc
 
 func Test_switchbuf()
+  CheckNotBSD
   call s:create_test_file('Xqftestfile1')
   call s:create_test_file('Xqftestfile2')
   call s:create_test_file('Xqftestfile3')
index e93ea29dff7cf22bc8c183cdb5020f18246729eb..99cb09c50e338cc74f88d9e18cd1f61e4d01873e 100644 (file)
@@ -1,7 +1,10 @@
 " Test the :source! command
+source check.vim
 
 func Test_source_utf8()
   " check that sourcing a script with 0x80 as second byte works
+  " does not work correctly on BSD
+  CheckNotBSD
   new
   call setline(1, [':%s/àx/--à1234--/g', ':%s/Àx/--À1234--/g'])
   write! Xscript
@@ -31,6 +34,7 @@ endfunc
 
 " Test for sourcing a file with CTRL-V's at the end of the line
 func Test_source_ctrl_v()
+    CheckNotBSD
     call writefile(['map __1 afirst',
                \ 'map __2 asecond',
                \ 'map __3 athird',
index 43a93847a98329ad1ff0a26fad2ca741267dcb20..fb810e7f787235d484c0fd0917b76c1b1a20f8e7 100644 (file)
@@ -870,6 +870,7 @@ func Test_terminal_wqall()
 endfunc
 
 func Test_terminal_composing_unicode()
+  CheckNotBSD
   let save_enc = &encoding
   set encoding=utf-8
 
index 312925b3a65638feea5f9660cfeb4923f0020ebf..f3c86b44fb382efd3fc2077a40e14862d6d6f377 100644 (file)
@@ -86,6 +86,9 @@ endfunc
 " test that g~ap changes one paragraph only.
 func Test_gap()
   new
-  call feedkeys("iabcd\n\ndefg\egg0g~ap", "tx")
+  " setup text
+  call feedkeys("iabcd\<cr>\<cr>defg", "tx")
+  " modify only first line
+  call feedkeys("gg0g~ap", "tx")
   call assert_equal(["ABCD", "", "defg"], getline(1,3))
 endfunc
index d0638096f4c999b44d93e57d1881071ee30ac150..7318a6a6c4db8ad7c87759adf5cc94331b04afc1 100644 (file)
@@ -737,6 +737,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2358,
 /**/
     2357,
 /**/