patch 8.0.1305: writefile() never calls fsync()
Problem: Writefile() never calls fsync().
Solution: Follow the 'fsync' option with override to enable or disable.
diff --git a/src/testdir/test_writefile.vim b/src/testdir/test_writefile.vim
index f462d04..9703323b 100644
--- a/src/testdir/test_writefile.vim
+++ b/src/testdir/test_writefile.vim
@@ -93,3 +93,10 @@
endif
bwipe Xfile
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