From 5972ff00560b497de4cfe51d529b0c5aa9dd4fad Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 8 Jun 2019 10:53:43 +0200 Subject: [PATCH 2/4] vim-patch:83799a7b7 patch 8.0.1339: no test for what 8.0.1335 fixes Problem: No test for what 8.0.1335 fixes. Solution: Add a test. (Yasuhiro Matsumoto, closes vim/vim#2373) https://github.com/vim/vim/commit/83799a7b7414048df4ff4e507293416e8438e225 --- src/nvim/testdir/test_writefile.vim | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nvim/testdir/test_writefile.vim b/src/nvim/testdir/test_writefile.vim index aeee6ad88b..83047d613f 100644 --- a/src/nvim/testdir/test_writefile.vim +++ b/src/nvim/testdir/test_writefile.vim @@ -155,3 +155,11 @@ func Test_writefile_autowrite_nowrite() bwipe! set noautowrite endfunc + +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') +endfunc From b6eeb40d190d6057bd48ed6b37f5bc472e2eb14b Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 8 Jun 2019 10:54:11 +0200 Subject: [PATCH 3/4] 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 From 7d542b59002f9bef608fd89a2b70fc7baa7916dc Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 8 Jun 2019 10:55:09 +0200 Subject: [PATCH 4/4] Test_writefile_sync_dev_stdout: use s for sync explicitly --- src/nvim/testdir/test_writefile.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/testdir/test_writefile.vim b/src/nvim/testdir/test_writefile.vim index 54997c7692..9c9e051bc9 100644 --- a/src/nvim/testdir/test_writefile.vim +++ b/src/nvim/testdir/test_writefile.vim @@ -162,7 +162,7 @@ func Test_writefile_sync_dev_stdout() endif if filewritable('/dev/stdout') " Just check that this doesn't cause an error. - call writefile(['one'], '/dev/stdout') + call writefile(['one'], '/dev/stdout', 's') else throw 'Skipped: /dev/stdout is not writable' endif