aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-11-29 10:06:12 +0800
committerGitHub <noreply@github.com>2024-11-29 02:06:12 +0000
commit1536f79d86b9edac1100e58ad5fbc421d14bfaa1 (patch)
tree22d58000f1ae52112a933bca10fe6673e9bc8583
parent27965627a4ea3910e7729c0f8ff5e4afa303bc65 (diff)
downloadrneovim-1536f79d86b9edac1100e58ad5fbc421d14bfaa1.tar.gz
rneovim-1536f79d86b9edac1100e58ad5fbc421d14bfaa1.tar.bz2
rneovim-1536f79d86b9edac1100e58ad5fbc421d14bfaa1.zip
vim-patch:8.2.2993: 'fileencodings' default value should depend on 'encoding' (#31379)
Problem: 'fileencodings' default value should depend on 'encoding'. (Gary Johnson) Solution: When 'encoding' is "utf-8" use a different default value for 'fileencodings'. https://github.com/vim/vim/commit/5ffefbb35aba2448099314a9e09714d2f3b2b1bd Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--test/old/testdir/test_options.vim8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/old/testdir/test_options.vim b/test/old/testdir/test_options.vim
index b6bdb1be52..caafd9d820 100644
--- a/test/old/testdir/test_options.vim
+++ b/test/old/testdir/test_options.vim
@@ -2252,6 +2252,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