aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-02-04 09:23:54 +0800
committerzeertzjq <zeertzjq@outlook.com>2022-02-04 09:23:54 +0800
commit22a7693915c15cb4822f85323961687c5e86675b (patch)
tree17b55d1c5137b57ce0d6d0abeb0d7f9f6eda1e5c
parent4c4a80950e98be2529c4ed51f5563ebe3ece8064 (diff)
downloadrneovim-22a7693915c15cb4822f85323961687c5e86675b.tar.gz
rneovim-22a7693915c15cb4822f85323961687c5e86675b.tar.bz2
rneovim-22a7693915c15cb4822f85323961687c5e86675b.zip
vim-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 vim/vim#3909) https://github.com/vim/vim/commit/a02e3f65c52a2c8c987e7dcac5df1f8db9a7b0de
-rw-r--r--src/nvim/testdir/test_functions.vim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_functions.vim b/src/nvim/testdir/test_functions.vim
index e4c6c6a3b2..67b94d5ef8 100644
--- a/src/nvim/testdir/test_functions.vim
+++ b/src/nvim/testdir/test_functions.vim
@@ -1397,6 +1397,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'))