Mercurial > vim
comparison src/testdir/test_fileformat.vim @ 24101:6d3dee0d7de5 v8.2.2592
patch 8.2.2592: code coverage could be improved
Commit: https://github.com/vim/vim/commit/6fd367a97c8653a2d734a38252c7d68d4b2ebaa7
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 13 13:14:04 2021 +0100
patch 8.2.2592: code coverage could be improved
Problem: Code coverage could be improved.
Solution: Add a few more tests. (Dominique Pell?, closes https://github.com/vim/vim/issues/7957)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 13 Mar 2021 13:15:03 +0100 |
parents | 08940efa6b4e |
children | dc3d45d9a4a8 |
comparison
equal
deleted
inserted
replaced
24100:37801c4fe1a4 | 24101:6d3dee0d7de5 |
---|---|
29 " cleanup | 29 " cleanup |
30 call delete('Xfile') | 30 call delete('Xfile') |
31 let &ffs = ffs | 31 let &ffs = ffs |
32 au! BufReadPre Xfile | 32 au! BufReadPre Xfile |
33 bw! | 33 bw! |
34 endfunc | |
35 | |
36 func Test_fileformat_nomodifiable() | |
37 new | |
38 setlocal nomodifiable | |
39 | |
40 call assert_fails('set fileformat=latin1', 'E21:') | |
41 | |
42 bw | |
34 endfunc | 43 endfunc |
35 | 44 |
36 " Convert the contents of a file into a literal string | 45 " Convert the contents of a file into a literal string |
37 func s:file2str(fname) | 46 func s:file2str(fname) |
38 let b = readfile(a:fname, 'B') | 47 let b = readfile(a:fname, 'B') |