summaryrefslogtreecommitdiffstats
path: root/src/testdir/test_functions.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-02-07 21:27:14 +0100
committerBram Moolenaar <Bram@vim.org>2019-02-07 21:27:14 +0100
commita02e3f65c52a2c8c987e7dcac5df1f8db9a7b0de (patch)
tree9c88a77d0777cb3672dd8ab0d99043bfe668be68 /src/testdir/test_functions.vim
parentee8188fc74a7cf9ee7acb634b2bb7a032d0cb24c (diff)
patch 8.1.0878: test for has('bsd') fails on some BSD systemsv8.1.0878
Problem: Test for has('bsd') fails on some BSD systems. Solution: Adjust the uname match. (James McCoy, closes #3909)
Diffstat (limited to 'src/testdir/test_functions.vim')
-rw-r--r--src/testdir/test_functions.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/testdir/test_functions.vim b/src/testdir/test_functions.vim
index b08d9aa856..e75a8965a0 100644
--- 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'))