summaryrefslogtreecommitdiff
path: root/src/testdir/test_fileformat.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-03-13 13:14:04 +0100
committerBram Moolenaar <Bram@vim.org>2021-03-13 13:14:04 +0100
commit6fd367a97c8653a2d734a38252c7d68d4b2ebaa7 (patch)
tree4b52fc3527af8e939ba9fe3bff0acb81d61a6bb4 /src/testdir/test_fileformat.vim
parentc80f647512b001fb6952ed10d076d56c3d4b84e0 (diff)
downloadvim-git-6fd367a97c8653a2d734a38252c7d68d4b2ebaa7.tar.gz
patch 8.2.2592: code coverage could be improvedv8.2.2592
Problem: Code coverage could be improved. Solution: Add a few more tests. (Dominique Pellé, closes #7957)
Diffstat (limited to 'src/testdir/test_fileformat.vim')
-rw-r--r--src/testdir/test_fileformat.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/testdir/test_fileformat.vim b/src/testdir/test_fileformat.vim
index 09be25822..07819dc2e 100644
--- a/src/testdir/test_fileformat.vim
+++ b/src/testdir/test_fileformat.vim
@@ -33,6 +33,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')