summaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-03-13 13:12:27 +0000
committerBram Moolenaar <Bram@vim.org>2022-03-13 13:12:27 +0000
commit4f3321f704ec0c2a522f12a580530283ae28856f (patch)
tree0cd24963bf722d7f5cc4a438ede4dcbd5093a7d5 /src/eval.c
parent986b0fd0c550d9834a3cc45dd87555c13152c391 (diff)
patch 8.2.4556: test fails without the +job or +channel featurev8.2.4556
Problem: Test fails without the +job or +channel feature. (Dominique Pellé) Solution: Adjust #ifdefs. Pass on skip flag. (closes #9942)
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c
index 1d57c38aa0..3ecbf6546f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3515,15 +3515,18 @@ handle_predefined(char_u *s, int len, typval_T *rettv)
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, typval_T *rettv)
}
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;