0
0
mirror of https://github.com/vim/vim.git synced 2025-07-24 10:45:12 -04:00

patch 8.1.1941: getftype() test fails on Mac

Problem:    getftype() test fails on Mac.
Solution:   Skip /dev/fd/.
This commit is contained in:
Bram Moolenaar 2019-08-30 13:12:25 +02:00
parent 34ed68d40e
commit ad5db44c01
2 changed files with 11 additions and 6 deletions

View File

@ -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')
" On Mac /def/fd/2 is found but the type is "fifo"
if cdevfile !~ '/dev/fd/'
let type = getftype(cdevfile) let type = getftype(cdevfile)
" 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('cdev', 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

View File

@ -761,6 +761,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1941,
/**/ /**/
1940, 1940,
/**/ /**/