diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-02-13 06:13:18 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-02-13 06:13:18 +0800 |
| commit | 05f744cfc7411cd22320116f20ebcc1d06443fea (patch) | |
| tree | 6807f95d9a3a23bcc313290f644a4ac9e18bf31e /src/nvim/testdir | |
| parent | 90a43e846d96255b35338e95b5841f913ce2c657 (diff) | |
| parent | dc415ce2986c2d09ae9c4c4d01c142f5e780cd47 (diff) | |
| download | rneovim-05f744cfc7411cd22320116f20ebcc1d06443fea.tar.gz rneovim-05f744cfc7411cd22320116f20ebcc1d06443fea.tar.bz2 rneovim-05f744cfc7411cd22320116f20ebcc1d06443fea.zip | |
Merge pull request #16643 from zeertzjq/vim-8.1.2184
vim-patch:8.1.2184,8.2.3804: option context is not copied when splitting a window
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_options.vim | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 7d1fed3b94..8612b7013b 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -314,21 +314,50 @@ func Test_set_errors() set modifiable& endfunc +func CheckWasSet(name) + let verb_cm = execute('verbose set ' .. a:name .. '?') + call assert_match('Last set from.*test_options.vim', verb_cm) +endfunc +func CheckWasNotSet(name) + let verb_cm = execute('verbose set ' .. a:name .. '?') + call assert_notmatch('Last set from', verb_cm) +endfunc + " Must be executed before other tests that set 'term'. func Test_000_term_option_verbose() if has('nvim') || has('gui_running') return endif - let verb_cm = execute('verbose set t_cm') - call assert_notmatch('Last set from', verb_cm) + + call CheckWasNotSet('t_cm') let term_save = &term set term=ansi - let verb_cm = execute('verbose set t_cm') - call assert_match('Last set from.*test_options.vim', verb_cm) + call CheckWasSet('t_cm') let &term = term_save endfunc +func Test_copy_context() + setlocal list + call CheckWasSet('list') + split + call CheckWasSet('list') + quit + setlocal nolist + + set ai + call CheckWasSet('ai') + set filetype=perl + call CheckWasSet('filetype') + set fo=tcroq + call CheckWasSet('fo') + + split Xsomebuf + call CheckWasSet('ai') + call CheckWasNotSet('filetype') + call CheckWasSet('fo') +endfunc + func Test_set_ttytype() " Nvim does not support 'ttytype'. if !has('nvim') && !has('gui_running') && has('unix') |