diff src/testdir/test_window_cmd.vim @ 30972:62a42d860d87 v9.0.0821

patch 9.0.0820: memory leak with empty shell command Commit: https://github.com/vim/vim/commit/86e6717ace4f5e00eaeb84b59e3fc92bca548155 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Oct 31 12:24:12 2022 +0000 patch 9.0.0820: memory leak with empty shell command Problem: Memory leak with empty shell command. Solution: Free the empty string.
author Bram Moolenaar <Bram@vim.org>
date Wed, 02 Nov 2022 11:18:51 +0100
parents bff3fa5f4c74
children 1b194361b71a
line wrap: on
line diff
--- a/src/testdir/test_window_cmd.vim
+++ b/src/testdir/test_window_cmd.vim
@@ -1545,23 +1545,33 @@ func Test_win_move_statusline()
     call assert_true(id->win_move_statusline(-offset))
     call assert_equal(h, winheight(id))
   endfor
+
   " check that win_move_statusline doesn't error with offsets beyond moving
   " possibility
   call assert_true(win_move_statusline(id, 5000))
   call assert_true(winheight(id) > h)
   call assert_true(win_move_statusline(id, -5000))
   call assert_true(winheight(id) < h)
+
   " check that win_move_statusline returns false for an invalid window
   wincmd =
   let h = winheight(0)
   call assert_false(win_move_statusline(-1, 1))
   call assert_equal(h, winheight(0))
+
   " check that win_move_statusline returns false for a popup window
   let id = popup_create(['hello', 'world'], {})
   let h = winheight(id)
   call assert_false(win_move_statusline(id, 1))
   call assert_equal(h, winheight(id))
   call popup_close(id)
+
+  " check that using another tabpage fails without crash
+  let id = win_getid()
+  tabnew
+  call assert_fails('call win_move_statusline(id, -1)', 'E1308:')
+  tabclose
+
   %bwipe!
 endfunc