aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorKunMing Xie <qqzz014@gmail.com>2017-07-23 01:03:15 +0800
committerJustin M. Keyes <justinkz@gmail.com>2017-07-22 19:03:15 +0200
commit8fb599029f41b74e6c34b680a0817ff19f544cf3 (patch)
tree21258e09972ee06ff0954b7ffbcf83f201bcf3c7 /src/nvim/testdir
parent962e8cc1dd4d1b901b249e8434ac4db6554d3e05 (diff)
downloadrneovim-8fb599029f41b74e6c34b680a0817ff19f544cf3.tar.gz
rneovim-8fb599029f41b74e6c34b680a0817ff19f544cf3.tar.bz2
rneovim-8fb599029f41b74e6c34b680a0817ff19f544cf3.zip
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
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_alot.vim1
-rw-r--r--src/nvim/testdir/test_fileformat.vim17
2 files changed, 18 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_alot.vim b/src/nvim/testdir/test_alot.vim
index 1103778107..d55170c27c 100644
--- a/src/nvim/testdir/test_alot.vim
+++ b/src/nvim/testdir/test_alot.vim
@@ -14,6 +14,7 @@ source test_float_func.vim
source test_functions.vim
source test_goto.vim
source test_jumps.vim
+source test_fileformat.vim
source test_lambda.vim
source test_menu.vim
source test_mapping.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