aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-08 18:12:28 -0400
committerJustin M. Keyes <justinkz@gmail.com>2019-06-09 00:12:28 +0200
commit0b4c53fc23581abb14b6d4c567dc08720f509020 (patch)
tree39dbdb8dc163206cd626ec8a35063d0bfdab7a57 /src/nvim/testdir
parent93afb347124dff6e2a67254342bc2d822eed52df (diff)
downloadrneovim-0b4c53fc23581abb14b6d4c567dc08720f509020.tar.gz
rneovim-0b4c53fc23581abb14b6d4c567dc08720f509020.tar.bz2
rneovim-0b4c53fc23581abb14b6d4c567dc08720f509020.zip
vim-patch:8.0.1305: writefile() never calls fsync() #10153
Problem: Writefile() never calls fsync(). Solution: Follow the 'fsync' option with override to enable or disable. https://github.com/vim/vim/commit/7567d0b115e332f61a9f390aaccdf7825b891227
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_writefile.vim7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_writefile.vim b/src/nvim/testdir/test_writefile.vim
index 9c9e051bc9..9da9df2150 100644
--- a/src/nvim/testdir/test_writefile.vim
+++ b/src/nvim/testdir/test_writefile.vim
@@ -167,3 +167,10 @@ func Test_writefile_sync_dev_stdout()
throw 'Skipped: /dev/stdout is not writable'
endif
endfunc
+
+func Test_writefile_sync_arg()
+ " This doesn't check if fsync() works, only that the argument is accepted.
+ call writefile(['one'], 'Xtest', 's')
+ call writefile(['two'], 'Xtest', 'S')
+ call delete('Xtest')
+endfunc