diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2022-07-17 11:30:32 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-17 11:30:32 +0800 |
| commit | 53c398d8f44f1796c216402c953512eb57733529 (patch) | |
| tree | a4abcbed4256058b40e4dc1badd2f06c22079abf /src/nvim/testdir/test_options.vim | |
| parent | 9f837a5dcf61e0b27778dd7127036e12d694d92c (diff) | |
| parent | 7c3a87182d471649126c58d999d46abede6f60cd (diff) | |
| download | rneovim-53c398d8f44f1796c216402c953512eb57733529.tar.gz rneovim-53c398d8f44f1796c216402c953512eb57733529.tar.bz2 rneovim-53c398d8f44f1796c216402c953512eb57733529.zip | |
Merge pull request #19402 from zeertzjq/vim-8.2.0655
vim-patch:8.2.{0655,1040}: not enough tests
Diffstat (limited to 'src/nvim/testdir/test_options.vim')
| -rw-r--r-- | src/nvim/testdir/test_options.vim | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_options.vim b/src/nvim/testdir/test_options.vim index 85ac4939eb..1f003041e6 100644 --- a/src/nvim/testdir/test_options.vim +++ b/src/nvim/testdir/test_options.vim @@ -466,9 +466,11 @@ func Test_set_one_column() endfunc func Test_set_values() - " The file is only generated when running "make test" in the src directory. + " opt_test.vim is generated from ../optiondefs.h using gen_opt_test.vim if filereadable('opt_test.vim') source opt_test.vim + else + throw 'Skipped: opt_test.vim does not exist' endif endfunc @@ -813,6 +815,37 @@ func Test_opt_boolean() set number& endfunc +" Test for the 'window' option +func Test_window_opt() + " Needs only one open widow + %bw! + call setline(1, range(1, 8)) + set window=5 + exe "normal \<C-F>" + call assert_equal(4, line('w0')) + exe "normal \<C-F>" + call assert_equal(7, line('w0')) + exe "normal \<C-F>" + call assert_equal(8, line('w0')) + exe "normal \<C-B>" + call assert_equal(5, line('w0')) + exe "normal \<C-B>" + call assert_equal(2, line('w0')) + exe "normal \<C-B>" + call assert_equal(1, line('w0')) + set window=1 + exe "normal gg\<C-F>" + call assert_equal(2, line('w0')) + exe "normal \<C-F>" + call assert_equal(3, line('w0')) + exe "normal \<C-B>" + call assert_equal(2, line('w0')) + exe "normal \<C-B>" + call assert_equal(1, line('w0')) + enew! + set window& +endfunc + " Test for the 'winminheight' option func Test_opt_winminheight() only! |