diff src/testdir/test_functions.vim @ 15742:916c13256877 v8.1.0878

patch 8.1.0878: test for has('bsd') fails on some BSD systems commit https://github.com/vim/vim/commit/a02e3f65c52a2c8c987e7dcac5df1f8db9a7b0de Author: Bram Moolenaar <Bram@vim.org> Date: Thu Feb 7 21:27:14 2019 +0100 patch 8.1.0878: test for has('bsd') fails on some BSD systems Problem: Test for has('bsd') fails on some BSD systems. Solution: Adjust the uname match. (James McCoy, closes https://github.com/vim/vim/issues/3909)
author Bram Moolenaar <Bram@vim.org>
date Thu, 07 Feb 2019 21:30:06 +0100
parents 772e72b046a3
children e16dc16dc927
line wrap: on
line diff
--- a/src/testdir/test_functions.vim
+++ b/src/testdir/test_functions.vim
@@ -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'))