From b6eeb40d190d6057bd48ed6b37f5bc472e2eb14b Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 8 Jun 2019 10:54:11 +0200 Subject: 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) https://github.com/vim/vim/commit/9980b37a80dc72eef05bf8862aaf475ab17790a5 --- src/nvim/testdir/test_writefile.vim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/nvim/testdir/test_writefile.vim b/src/nvim/testdir/test_writefile.vim index 83047d613f..54997c7692 100644 --- a/src/nvim/testdir/test_writefile.vim +++ b/src/nvim/testdir/test_writefile.vim @@ -160,6 +160,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 -- cgit