diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-10-23 07:26:45 +0800 |
---|---|---|
committer | zeertzjq <zeertzjq@outlook.com> | 2024-10-23 07:38:11 +0800 |
commit | da458277877637b7ed59152c0d91e00fcc42635d (patch) | |
tree | face2e10fba91c26f12bda8b6c63dfa1f9db60f7 | |
parent | 4ad4225bdbe8f9f6395691ecd0041af8570e2420 (diff) | |
download | rneovim-da458277877637b7ed59152c0d91e00fcc42635d.tar.gz rneovim-da458277877637b7ed59152c0d91e00fcc42635d.tar.bz2 rneovim-da458277877637b7ed59152c0d91e00fcc42635d.zip |
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>
-rw-r--r-- | test/old/testdir/gen_opt_test.vim | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/test/old/testdir/gen_opt_test.vim b/test/old/testdir/gen_opt_test.vim index f64798f8dd..325e7e9438 100644 --- 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: |