diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-02-28 21:55:55 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-28 21:55:55 +0800 |
| commit | f289fc4abb8e7c02acfd2dfc834cc6447193a67e (patch) | |
| tree | 4790d7d0eb363611d524dad5b09e2687bec2a1ec /src/nvim/testdir/test_tabpage.vim | |
| parent | faa5d5be4b998427b3378d16ea5ce6ef6f5ddfd0 (diff) | |
| parent | 278aeee3aed753d1084597378e653395bd472c42 (diff) | |
| download | rneovim-f289fc4abb8e7c02acfd2dfc834cc6447193a67e.tar.gz rneovim-f289fc4abb8e7c02acfd2dfc834cc6447193a67e.tar.bz2 rneovim-f289fc4abb8e7c02acfd2dfc834cc6447193a67e.zip | |
Merge pull request #22456 from zeertzjq/vim-9.0.0430
vim-patch:8.2.{4668,4670},9.0.0430: cannot use repeat() with a blob
Diffstat (limited to 'src/nvim/testdir/test_tabpage.vim')
| -rw-r--r-- | src/nvim/testdir/test_tabpage.vim | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_tabpage.vim b/src/nvim/testdir/test_tabpage.vim index c20c798c49..db23a36dd4 100644 --- a/src/nvim/testdir/test_tabpage.vim +++ b/src/nvim/testdir/test_tabpage.vim @@ -846,6 +846,30 @@ func Test_lastused_tabpage() tabonly! endfunc +" Test for tabpage allocation failure +func Test_tabpage_alloc_failure() + CheckFunction test_alloc_fail + call test_alloc_fail(GetAllocId('newtabpage_tvars'), 0, 0) + call assert_fails('tabnew', 'E342:') + + call test_alloc_fail(GetAllocId('newtabpage_tvars'), 0, 0) + edit Xfile1 + call assert_fails('tabedit Xfile2', 'E342:') + call assert_equal(1, winnr('$')) + call assert_equal(1, tabpagenr('$')) + call assert_equal('Xfile1', @%) + + new + call test_alloc_fail(GetAllocId('newtabpage_tvars'), 0, 0) + call assert_fails('wincmd T', 'E342:') + bw! + + call test_alloc_fail(GetAllocId('newtabpage_tvars'), 0, 0) + call assert_fails('tab split', 'E342:') + call assert_equal(2, winnr('$')) + call assert_equal(1, tabpagenr('$')) +endfunc + " this was giving ml_get errors func Test_tabpage_last_line() enew |