]> granicus.if.org Git - vim/commitdiff
patch 8.1.0878: test for has('bsd') fails on some BSD systems v8.1.0878
authorBram Moolenaar <Bram@vim.org>
Thu, 7 Feb 2019 20:27:14 +0000 (21:27 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 7 Feb 2019 20:27:14 +0000 (21:27 +0100)
Problem:    Test for has('bsd') fails on some BSD systems.
Solution:   Adjust the uname match. (James McCoy, closes #3909)

src/testdir/test_functions.vim
src/version.c

index b08d9aa85665fb5d1d075039a69e291e01208e87..e75a8965a03ee8d07b338eb4420f7b41d332ea69 100644 (file)
@@ -1238,6 +1238,8 @@ func Test_platform_name()
     let uname = system('uname')
     call assert_equal(uname =~? 'BeOS', has('beos'))
     call assert_equal(uname =~? 'BSD\|DragonFly', has('bsd'))
+    " GNU userland on BSD kernels (e.g., GNU/kFreeBSD) don't have BSD defined
+    call assert_equal(uname =~? '\%(GNU/k\w\+\)\@<!BSD\|DragonFly', has('bsd'))
     call assert_equal(uname =~? 'HP-UX', has('hpux'))
     call assert_equal(uname =~? 'Linux', has('linux'))
     call assert_equal(uname =~? 'Darwin', has('mac'))
index 3ad7869b407e57141250cc6e7e274d02b8c798a0..6a8ba37551ac3bc1a8954d2205a435d0c695928e 100644 (file)
@@ -783,6 +783,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    878,
 /**/
     877,
 /**/