]> granicus.if.org Git - vim/commitdiff
patch 8.0.1744: on some systems /dev/stdout isn't writable v8.0.1744
authorBram Moolenaar <Bram@vim.org>
Sat, 21 Apr 2018 18:12:35 +0000 (20:12 +0200)
committerBram Moolenaar <Bram@vim.org>
Sat, 21 Apr 2018 18:12:35 +0000 (20:12 +0200)
Problem:    On some systems /dev/stdout isn't writable.
Solution:   Skip test if writing is not possible. (James McCoy, closes #2830)

src/testdir/test_writefile.vim
src/version.c

index b8e0001f71d9cef945182f20a546fa509fe6bcf5..672ddd3a74706f48501f2826c4f66d62073d446e 100644 (file)
@@ -105,6 +105,10 @@ func Test_writefile_sync_dev_stdout()
   if !has('unix')
     return
   endif
-  " Just check that this doesn't cause an error.
-  call writefile(['one'], '/dev/stdout')
+  if filewritable('/dev/stdout')
+    " Just check that this doesn't cause an error.
+    call writefile(['one'], '/dev/stdout')
+  else
+    throw 'Skipped: /dev/stdout is not writable'
+  endif
 endfunc
index 52486ac6db52d769c89d2ebc536ba7ac42e36277..0c25fd7f04cd901520a3fbe7086cf71f40baef8f 100644 (file)
@@ -761,6 +761,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1744,
 /**/
     1743,
 /**/