changeset 28721:ec4086492eda v8.2.4885

patch 8.2.4885: test fails with the job/channel feature Commit: https://github.com/vim/vim/commit/f1d63b9cba9ca91d6367615c6098761c30c6cb5b Author: Bram Moolenaar <Bram@vim.org> Date: Fri May 6 13:37:42 2022 +0100 patch 8.2.4885: test fails with the job/channel feature Problem: Test fails with the job/channel feature. Solution: Move check for job/channel separately.
author Bram Moolenaar <Bram@vim.org>
date Fri, 06 May 2022 14:45:03 +0200
parents e15ad62b584a
children afa1695e59a0
files src/testdir/test_vim9_script.vim src/version.c
diffstat 2 files changed, 15 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/src/testdir/test_vim9_script.vim
+++ b/src/testdir/test_vim9_script.vim
@@ -4199,10 +4199,6 @@ def Test_echo_uninit_variables()
   var Var_func: func
   var var_string: string
   var var_blob: blob
-  if has('job')
-    var var_job: job
-    var var_channel: channel
-  endif
   var var_list: list<any>
   var var_dict: dict<any>
 
@@ -4213,19 +4209,23 @@ def Test_echo_uninit_variables()
   echo Var_func
   echo var_string
   echo var_blob
-  if has('job')
-    echo var_job
-    echo var_channel
-  else
-    echo 'no process'
-    echo 'channel fail'
-  endif
   echo var_list
   echo var_dict
   redir END
 
-  assert_equal(['false', '0', '0.0', 'function()', '', '0z', 'no process',
-    'channel fail', '[]', '{}'], res->split('\n'))
+  assert_equal(['false', '0', '0.0', 'function()', '', '0z', '[]', '{}'], res->split('\n'))
+
+  if has('job')
+    var var_job: job
+    var var_channel: channel
+
+    redir => res
+    echo var_job
+    echo var_channel
+    redir END
+
+    assert_equal(['no process', 'channel fail'], res->split('\n'))
+  endif
 enddef
 
 " Keep this last, it messes up highlighting.
--- a/src/version.c
+++ b/src/version.c
@@ -747,6 +747,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    4885,
+/**/
     4884,
 /**/
     4883,