mirror of
https://github.com/neovim/neovim.git
synced 2025-10-07 18:36:30 +00:00
vim-patch:8.1.1941: getftype() test fails on Mac #10894
Problem: getftype() test fails on Mac.
Solution: Skip /dev/fd/.
ad5db44c01
This commit is contained in:

committed by
Justin M. Keyes

parent
6024fb5267
commit
16c289f217
@@ -143,10 +143,13 @@ func Test_getftype()
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
|
for cdevfile in systemlist('find /dev -type c -maxdepth 2 2>/dev/null')
|
||||||
let type = getftype(cdevfile)
|
" On Mac /def/fd/2 is found but the type is "fifo"
|
||||||
" ignore empty result, can happen if the file disappeared
|
if cdevfile !~ '/dev/fd/'
|
||||||
if type != ''
|
let type = getftype(cdevfile)
|
||||||
call assert_equal('cdev', type)
|
" ignore empty result, can happen if the file disappeared
|
||||||
|
if type != ''
|
||||||
|
call assert_equal('cdev', type, 'for ' .. cdevfile)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
@@ -154,7 +157,7 @@ func Test_getftype()
|
|||||||
let type = getftype(bdevfile)
|
let type = getftype(bdevfile)
|
||||||
" ignore empty result, can happen if the file disappeared
|
" ignore empty result, can happen if the file disappeared
|
||||||
if type != ''
|
if type != ''
|
||||||
call assert_equal('bdev', type)
|
call assert_equal('bdev', type, 'for ' .. bdevfile)
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
@@ -164,7 +167,7 @@ func Test_getftype()
|
|||||||
let type = getftype(socketfile)
|
let type = getftype(socketfile)
|
||||||
" ignore empty result, can happen if the file disappeared
|
" ignore empty result, can happen if the file disappeared
|
||||||
if type != ''
|
if type != ''
|
||||||
call assert_equal('socket', type)
|
call assert_equal('socket', type, 'for ' .. socketfile)
|
||||||
endif
|
endif
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user