From 8fb599029f41b74e6c34b680a0817ff19f544cf3 Mon Sep 17 00:00:00 2001 From: KunMing Xie Date: Sun, 23 Jul 2017 01:03:15 +0800 Subject: vim-patch:8.0.0031 (#7050) Problem: After ":bwipeout" 'fileformat' is not set to the right default. Solution: Get the default from 'fileformats'. (Mike Williams) https://github.com/vim/vim/commit/e8ef3a093453b73594e15462d4de50b011c8ba66 --- src/nvim/testdir/test_fileformat.vim | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/nvim/testdir/test_fileformat.vim (limited to 'src/nvim/testdir/test_fileformat.vim') diff --git a/src/nvim/testdir/test_fileformat.vim b/src/nvim/testdir/test_fileformat.vim new file mode 100644 index 0000000000..584f20cdfc --- /dev/null +++ b/src/nvim/testdir/test_fileformat.vim @@ -0,0 +1,17 @@ +" Test behavior of fileformat after bwipeout of last buffer + +func Test_fileformat_after_bw() + bwipeout + set fileformat& + if &fileformat == 'dos' + let test_fileformats = 'unix' + elseif &fileformat == 'unix' + let test_fileformats = 'mac' + else " must be mac + let test_fileformats = 'dos' + endif + exec 'set fileformats='.test_fileformats + bwipeout! + call assert_equal(test_fileformats, &fileformat) + set fileformats& +endfunc -- cgit