# HG changeset patch # User Bram Moolenaar # Date 1647177303 -3600 # Node ID b47698ee4a14a26fb1c21173b18d900c52fc890a # Parent 9cd35edfb4af9f1c63528104f8c4928610e08dbf patch 8.2.4556: test fails without the +job or +channel feature Commit: https://github.com/vim/vim/commit/4f3321f704ec0c2a522f12a580530283ae28856f Author: Bram Moolenaar Date: Sun Mar 13 13:12:27 2022 +0000 patch 8.2.4556: test fails without the +job or +channel feature Problem: Test fails without the +job or +channel feature. (Dominique Pell?) Solution: Adjust #ifdefs. Pass on skip flag. (closes https://github.com/vim/vim/issues/9942) diff --git a/src/eval.c b/src/eval.c --- a/src/eval.c +++ b/src/eval.c @@ -3515,15 +3515,18 @@ handle_predefined(char_u *s, int len, ty return OK; } break; -#ifdef FEAT_JOB_CHANNEL case 8: if (STRNCMP(s, "null_job", 8) == 0) { +#ifdef FEAT_JOB_CHANNEL rettv->v_type = VAR_JOB; rettv->vval.v_job = NULL; +#else + rettv->v_type = VAR_SPECIAL; + rettv->vval.v_number = VVAL_NULL; +#endif return OK; } break; -#endif case 9: if (STRNCMP(s, "null_", 5) != 0) break; @@ -3554,14 +3557,17 @@ handle_predefined(char_u *s, int len, ty } break; case 12: -#ifdef FEAT_JOB_CHANNEL if (STRNCMP(s, "null_channel", 12) == 0) { +#ifdef FEAT_JOB_CHANNEL rettv->v_type = VAR_CHANNEL; rettv->vval.v_channel = NULL; +#else + rettv->v_type = VAR_SPECIAL; + rettv->vval.v_number = VVAL_NULL; +#endif return OK; } -#endif if (STRNCMP(s, "null_partial", 12) == 0) { rettv->v_type = VAR_PARTIAL; diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -751,6 +751,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 4556, +/**/ 4555, /**/ 4554, diff --git a/src/vim9compile.c b/src/vim9compile.c --- a/src/vim9compile.c +++ b/src/vim9compile.c @@ -762,6 +762,7 @@ fill_exarg_from_cctx(exarg_T *eap, cctx_ { eap->getline = exarg_getline; eap->cookie = cctx; + eap->skip = cctx->ctx_skip == SKIP_YES; } /* @@ -855,7 +856,8 @@ compile_nested_function(exarg_T *eap, cc semsg(_(e_namespace_not_supported_str), name_start); return NULL; } - if (check_defined(name_start, name_end - name_start, cctx, + if (cctx->ctx_skip != SKIP_YES + && check_defined(name_start, name_end - name_start, cctx, NULL, FALSE) == FAIL) return NULL; if (!ASCII_ISUPPER(is_global ? name_start[2] : name_start[0]))