Skip to content

Commit 9980b37

Browse files
committed
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 #2830)
1 parent 6d150f7 commit 9980b37

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

src/testdir/test_writefile.vim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ func Test_writefile_sync_dev_stdout()
105105
if !has('unix')
106106
return
107107
endif
108-
" Just check that this doesn't cause an error.
109-
call writefile(['one'], '/dev/stdout')
108+
if filewritable('/dev/stdout')
109+
" Just check that this doesn't cause an error.
110+
call writefile(['one'], '/dev/stdout')
111+
else
112+
throw 'Skipped: /dev/stdout is not writable'
113+
endif
110114
endfunc

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
1744,
764766
/**/
765767
1743,
766768
/**/

0 commit comments

Comments
 (0)