aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2019-08-30 22:47:28 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-08-30 22:47:28 +0200
commit16c289f21744cbefe80852dc4376313b8985647e (patch)
treea3178d74e9be25bf066f3b3f12e734f9e24c05fa
parent6024fb5267e5b54eff39803876fb82650505edc4 (diff)
downloadrneovim-16c289f21744cbefe80852dc4376313b8985647e.tar.gz
rneovim-16c289f21744cbefe80852dc4376313b8985647e.tar.bz2
rneovim-16c289f21744cbefe80852dc4376313b8985647e.zip
vim-patch:8.1.1941: getftype() test fails on Mac #10894
Problem: getftype() test fails on Mac. Solution: Skip /dev/fd/. https://github.com/vim/vim/commit/ad5db44c0165b6254199e7af5962b42caf8b857c
-rw-r--r--src/nvim/testdir/test_stat.vim15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/nvim/testdir/test_stat.vim b/src/nvim/testdir/test_stat.vim
index 253f74c2ad..5b7df33d2c 100644
--- a/src/nvim/testdir/test_stat.vim
+++ b/src/nvim/testdir/test_stat.vim
@@ -143,10 +143,13 @@ func Test_getftype()
endif
for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
- let type = getftype(cdevfile)
- " ignore empty result, can happen if the file disappeared
- if type != ''
- call assert_equal('cdev', type)
+ " On Mac /def/fd/2 is found but the type is "fifo"
+ if cdevfile !~ '/dev/fd/'
+ let type = getftype(cdevfile)
+ " ignore empty result, can happen if the file disappeared
+ if type != ''
+ call assert_equal('cdev', type, 'for ' .. cdevfile)
+ endif
endif
endfor
@@ -154,7 +157,7 @@ func Test_getftype()
let type = getftype(bdevfile)
" ignore empty result, can happen if the file disappeared
if type != ''
- call assert_equal('bdev', type)
+ call assert_equal('bdev', type, 'for ' .. bdevfile)
endif
endfor
@@ -164,7 +167,7 @@ func Test_getftype()
let type = getftype(socketfile)
" ignore empty result, can happen if the file disappeared
if type != ''
- call assert_equal('socket', type)
+ call assert_equal('socket', type, 'for ' .. socketfile)
endif
endfor