diff options
| author | ZyX <kp-pav@yandex.ru> | 2017-11-19 22:05:22 +0300 |
|---|---|---|
| committer | ZyX <kp-pav@yandex.ru> | 2017-11-19 22:05:22 +0300 |
| commit | 03a129aacf7e4b77ceaccc71251ecb5bf41d2a8f (patch) | |
| tree | a3a05c99fe20de98aafbdea9314aa0d76f71aee9 /src/nvim/testdir/test_fileformat.vim | |
| parent | 6ea3a08fdbb276fe64dda60c5fb934360327ed39 (diff) | |
| parent | de8b1fd1dee5a91b2893fccc53cfd11631ccba38 (diff) | |
| download | rneovim-03a129aacf7e4b77ceaccc71251ecb5bf41d2a8f.tar.gz rneovim-03a129aacf7e4b77ceaccc71251ecb5bf41d2a8f.tar.bz2 rneovim-03a129aacf7e4b77ceaccc71251ecb5bf41d2a8f.zip | |
Merge branch 'master' into expression-parser
Diffstat (limited to 'src/nvim/testdir/test_fileformat.vim')
| -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..8dc25f62b1 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 = ["", "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 |