vim-patch:9980b37a80

patch 8.0.1744: on some systems /dev/stdout isn't writable

Problem:    On some systems /dev/stdout isn't writable.
Solution:   Skip test if writing is not possible. (James McCoy, closes vim/vim#2830)
9980b37a80
This commit is contained in:
Daniel Hahler
2019-06-08 10:54:11 +02:00
parent 5972ff0056
commit b6eeb40d19

View File

@@ -160,6 +160,10 @@ func Test_writefile_sync_dev_stdout()
if !has('unix') if !has('unix')
return return
endif endif
if filewritable('/dev/stdout')
" Just check that this doesn't cause an error. " Just check that this doesn't cause an error.
call writefile(['one'], '/dev/stdout') call writefile(['one'], '/dev/stdout')
else
throw 'Skipped: /dev/stdout is not writable'
endif
endfunc endfunc