Mercurial > vim
diff src/testdir/test_options.vim @ 24912:02fa8d72e4e3 v8.2.2993
patch 8.2.2993: 'fileencodings' default value should depend on 'encoding'
Commit: https://github.com/vim/vim/commit/5ffefbb35aba2448099314a9e09714d2f3b2b1bd
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 13 20:27:36 2021 +0200
patch 8.2.2993: 'fileencodings' default value should depend on 'encoding'
Problem: 'fileencodings' default value should depend on 'encoding'. (Gary
Johnson)
Solution: When 'encoding' is "utf-8" use a different default value for
'fileencodings'.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 13 Jun 2021 20:30:03 +0200 |
parents | 4c1b6f3eb96b |
children | 1186160ecf57 |
line wrap: on
line diff
--- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -1140,6 +1140,14 @@ func Test_opt_default() call assert_equal('vt', &formatoptions) set formatoptions&vim call assert_equal('tcq', &formatoptions) + + call assert_equal('ucs-bom,utf-8,default,latin1', &fencs) + set fencs=latin1 + set fencs& + call assert_equal('ucs-bom,utf-8,default,latin1', &fencs) + set fencs=latin1 + set all& + call assert_equal('ucs-bom,utf-8,default,latin1', &fencs) endfunc " Test for the 'cmdheight' option