patch 8.2.4583: screendump test fails

Problem:    Screendump test fails.
Solution:   Check that making a screendump is possible.
diff --git a/src/testdir/test_vim9_script.vim b/src/testdir/test_vim9_script.vim
index 3ad9c9d..94aa1e9 100644
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -3982,7 +3982,12 @@
   delete('Xprofile.vim')
 enddef
 
-def Test_misplaced_type()
+func Test_misplaced_type()
+  CheckRunVimInTerminal
+  call Run_Test_misplaced_type()
+endfunc
+
+def Run_Test_misplaced_type()
   writefile(['let g:somevar = "asdf"'], 'XTest_misplaced_type')
   var buf = g:RunVimInTerminal('-S XTest_misplaced_type', {'rows': 6})
   term_sendkeys(buf, ":vim9cmd echo islocked('g:somevar: string')\<CR>")