char_u buf[NUMBUFLEN];
if (eap->cmdidx == CMD_execute)
- p = tv_get_string_buf(&rettv, buf);
+ {
+ if (rettv.v_type == VAR_CHANNEL || rettv.v_type == VAR_JOB)
+ {
+ emsg(_(e_inval_string));
+ p = NULL;
+ }
+ else
+ p = tv_get_string_buf(&rettv, buf);
+ }
else
p = tv_stringify(&rettv, buf);
if (p == NULL)
call assert_fails('source Xversionscript', 'E999:')
call delete('Xversionscript')
endfunc
+
+func Test_excute_null()
+ call assert_fails('execute test_null_list()', 'E730:')
+ call assert_fails('execute test_null_dict()', 'E731:')
+ call assert_fails('execute test_null_blob()', 'E976:')
+ execute test_null_string()
+ call assert_fails('execute test_null_partial()', 'E729:')
+ if has('job')
+ call assert_fails('execute test_null_job()', 'E908:')
+ call assert_fails('execute test_null_channel()', 'E908:')
+ endif
+endfunc