neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit da458277877637b7ed59152c0d91e00fcc42635d
parent 4ad4225bdbe8f9f6395691ecd0041af8570e2420
Author: zeertzjq <zeertzjq@outlook.com>
Date:   Wed, 23 Oct 2024 07:26:45 +0800

vim-patch:9.1.0805: tests: minor issues in gen_opt_test.vim

Problem:  tests: minor issues in gen_opt_test.vim
Solution: fix restore value for 'undolevels', fix comment, fix
          wrong cpo value, add equality test for global-local options on
          switchback (Milly).

closes: vim/vim#15913

https://github.com/vim/vim/commit/231480f9753fa3fb28e17b670550ce43172c0eba

Cherry-pick gen_opt_test.vim change from patch 9.1.0807.

Co-authored-by: Milly <milly.ca@gmail.com>

Diffstat:
Mtest/old/testdir/gen_opt_test.vim | 12+++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/test/old/testdir/gen_opt_test.vim b/test/old/testdir/gen_opt_test.vim @@ -25,7 +25,7 @@ endwhile call extend(global_locals, #{ \ scrolloff: -1, \ sidescrolloff: -1, - \ undolevels: -12345, + \ undolevels: -123456, \}) " Get local-noglobal options. @@ -63,7 +63,8 @@ let skip_setglobal_reasons = #{ \ winhighlight: 'TODO(nvim): fix missing error handling for setglobal', \} -" The terminal size is restored at the end. +" Script header. +" The test values contains multibyte characters. let script = [ \ '" DO NOT EDIT: Generated with gen_opt_test.vim', \ '" Used by test_options_all.vim.', @@ -453,8 +454,9 @@ for option in options endfor " Testing to clear the local value and switch back to the global value. if global_locals->has_key(fullname) - let swichback_val = global_locals[fullname] - call add(script, $'setlocal {opt}={swichback_val}') + let switchback_val = global_locals[fullname] + call add(script, $'setlocal {opt}={switchback_val}') + call add(script, $'call assert_equal(&g:{fullname}, &{fullname})') endif endfor @@ -516,4 +518,4 @@ endif qa! -" vim:sw=2:ts=8:noet:nolist:nosta: +" vim:sw=2:ts=8:noet:nosta: