diff options
| author | Bram Moolenaar <Bram@vim.org> | 2016-10-12 17:45:29 +0200 |
|---|---|---|
| committer | Bram Moolenaar <Bram@vim.org> | 2016-10-12 17:45:29 +0200 |
| commit | e8ef3a093453b73594e15462d4de50b011c8ba66 (patch) | |
| tree | b0954c301736bd9c972f37f8efc49f63a64e6bdb /src/testdir | |
| parent | 0ba407012c63064f03f1a5677677d4da423e5a73 (diff) | |
| download | vim-git-e8ef3a093453b73594e15462d4de50b011c8ba66.tar.gz | |
patch 8.0.0031v8.0.0031
Problem: After ":bwipeout" 'fileformat' is not set to the right default.
Solution: Get the default from 'fileformats'. (Mike Williams)
Diffstat (limited to 'src/testdir')
| -rw-r--r-- | src/testdir/test_alot.vim | 3 | ||||
| -rw-r--r-- | src/testdir/test_fileformat.vim | 17 |
2 files changed, 19 insertions, 1 deletions
diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim index e57439112..d24b97fb9 100644 --- a/src/testdir/test_alot.vim +++ b/src/testdir/test_alot.vim @@ -12,10 +12,11 @@ source test_expand.vim source test_expr.vim source test_expand_dllpath.vim source test_feedkeys.vim -source test_fnamemodify.vim source test_file_perm.vim +source test_fileformat.vim source test_filter_cmd.vim source test_filter_map.vim +source test_fnamemodify.vim source test_glob2regpat.vim source test_goto.vim source test_help_tagjump.vim diff --git a/src/testdir/test_fileformat.vim b/src/testdir/test_fileformat.vim new file mode 100644 index 000000000..584f20cdf --- /dev/null +++ b/src/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 |
