return;
++list->lv_refcount;
}
+ else if (argvars[arg_off].v_type == VAR_JOB
+ || argvars[arg_off].v_type == VAR_CHANNEL)
+ {
+ emsg(_(e_inval_string));
+ return;
+ }
else
{
cmd = tv_get_string_chk(&argvars[arg_off]);
EXTERN char e_listblobreq[] INIT(= N_("E897: List or Blob required"));
EXTERN char e_listdictarg[] INIT(= N_("E712: Argument of %s must be a List or Dictionary"));
EXTERN char e_listdictblobarg[] INIT(= N_("E896: Argument of %s must be a List, Dictionary or Blob"));
+EXTERN char e_inval_string[] INIT(= N_("E908: using an invalid value as a String"));
#endif
#ifdef FEAT_QUICKFIX
EXTERN char e_readerrf[] INIT(= N_("E47: Error while reading errorfile"));
call assert_equal("\nsomething", execute('echo "something"', 'silent!'))
call assert_equal("", execute('burp', 'silent!'))
call assert_fails('call execute("echo \"x\"", 3.4)', 'E806:')
-
- call assert_equal("", execute(test_null_string()))
endfunc
func Test_execute_list()
call assert_equal("\n0\n1\n2\n3", execute(l))
call assert_equal("", execute([]))
- call assert_equal("", execute(test_null_list()))
endfunc
func Test_execute_does_not_change_col()
tabclose
unlet xyz
endfunc
+
+func Test_execute_null()
+ call assert_equal("", execute(test_null_string()))
+ call assert_equal("", execute(test_null_list()))
+ call assert_fails('call execute(test_null_dict())', 'E731:')
+ call assert_fails('call execute(test_null_blob())', 'E976:')
+ call assert_fails('call execute(test_null_partial())','E729:')
+ if has('job')
+ call assert_fails('call execute(test_null_job())', 'E908:')
+ call assert_fails('call execute(test_null_channel())', 'E908:')
+ endif
+endfunc