aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_fileformat.vim
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-07-23 10:05:51 +0800
committerckelsel <ckelsel@hotmail.com>2017-07-23 10:05:51 +0800
commit31c018244daa12caab3af357a368279a1f55d28c (patch)
tree1527bfa5f8338ba6b669c3e5597c8028214c0bcd /src/nvim/testdir/test_fileformat.vim
parent2c89195afdce9c66c875801753523f561ed5e4ca (diff)
parent253f6f3bbfd16b7aeb2f72714c1d5d1c88a3478a (diff)
downloadrneovim-31c018244daa12caab3af357a368279a1f55d28c.tar.gz
rneovim-31c018244daa12caab3af357a368279a1f55d28c.tar.bz2
rneovim-31c018244daa12caab3af357a368279a1f55d28c.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'src/nvim/testdir/test_fileformat.vim')
-rw-r--r--src/nvim/testdir/test_fileformat.vim17
1 files changed, 17 insertions, 0 deletions
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