]> granicus.if.org Git - vim/commitdiff
patch 8.1.1941: getftype() test fails on Mac v8.1.1941
authorBram Moolenaar <Bram@vim.org>
Fri, 30 Aug 2019 11:12:25 +0000 (13:12 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 30 Aug 2019 11:12:25 +0000 (13:12 +0200)
Problem:    getftype() test fails on Mac.
Solution:   Skip /dev/fd/.

src/testdir/test_stat.vim
src/version.c

index 8ec2a42c2456492cbd5698f64391190268511831..c8830d169b2bb536470ef09ebfa9e24b0757d437 100644 (file)
@@ -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
 
index f0ccfe3b05d39ac8cce449430c351ee5d3b571fc..e6f7d141b4a90731ccd6823534ed0e92aea5bd4b 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1941,
 /**/
     1940,
 /**/