diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-11-13 01:26:22 +0100 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2017-11-13 01:26:22 +0100 |
commit | 20c672a4604bc400229c52795a8488cd034ed1b4 (patch) | |
tree | 980325862ec12f34a95b9206efdfaa47e893063b /src/nvim/testdir | |
parent | 6b8c34137cf3253616e6a6f861380541537c0bb9 (diff) | |
parent | ea020f2e26f1e5cb89eb632c1b0ee51daf7718b4 (diff) | |
download | rneovim-20c672a4604bc400229c52795a8488cd034ed1b4.tar.gz rneovim-20c672a4604bc400229c52795a8488cd034ed1b4.tar.bz2 rneovim-20c672a4604bc400229c52795a8488cd034ed1b4.zip |
Merge #7530 'vim-patch:8.0.0226 vim-patch:8.0.0224'
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_fileformat.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_fileformat.vim b/src/nvim/testdir/test_fileformat.vim index 584f20cdfc..de505d3bd0 100644 --- a/src/nvim/testdir/test_fileformat.vim +++ b/src/nvim/testdir/test_fileformat.vim @@ -15,3 +15,19 @@ func Test_fileformat_after_bw() call assert_equal(test_fileformats, &fileformat) set fileformats& endfunc + +func Test_fileformat_autocommand() + let filecnt = ["\<CR>", "foobar\<CR>", "eins\<CR>", "\<CR>", "zwei\<CR>", "drei", "vier", "fünf", ""] + let ffs = &ffs + call writefile(filecnt, 'Xfile', 'b') + au BufReadPre Xfile set ffs=dos ff=dos + new Xfile + call assert_equal('dos', &l:ff) + call assert_equal('dos', &ffs) + + " cleanup + call delete('Xfile') + let &ffs = ffs + au! BufReadPre Xfile + bw! +endfunc |