From de500095b1adc675999315e70307b3425dca089c Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Sun, 6 Nov 2022 23:07:57 +0800 Subject: vim-patch:8.2.2592: code coverage could be improved (#20969) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Code coverage could be improved. Solution: Add a few more tests. (Dominique Pellé, closes vim/vim#7957) https://github.com/vim/vim/commit/6fd367a97c8653a2d734a38252c7d68d4b2ebaa7 Test case in test_viminfo.vim is applicable. --- src/nvim/testdir/test_fileformat.vim | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/nvim/testdir/test_fileformat.vim') diff --git a/src/nvim/testdir/test_fileformat.vim b/src/nvim/testdir/test_fileformat.vim index 81127ea59a..8d727a68c4 100644 --- a/src/nvim/testdir/test_fileformat.vim +++ b/src/nvim/testdir/test_fileformat.vim @@ -31,6 +31,15 @@ func Test_fileformat_autocommand() bw! endfunc +func Test_fileformat_nomodifiable() + new + setlocal nomodifiable + + call assert_fails('set fileformat=latin1', 'E21:') + + bw +endfunc + " Convert the contents of a file into a literal string func s:file2str(fname) let b = readfile(a:fname, 'B') -- cgit