Problem: Vim9: converting error message to exception not tested.
Solution: Test exception from error. Do not continue after :echoerr.
call CheckDefFailure(['throw xxx'], 'E1001:')
enddef
+let someJob = test_null_job()
+
+def FuncWithError()
+ echomsg g:someJob
+enddef
+
+func Test_convert_emsg_to_exception()
+ try
+ call FuncWithError()
+ catch
+ call assert_match('Vim:E908:', v:exception)
+ endtry
+endfunc
+
let s:export_script_lines =<< trim END
vim9script
let name: string = 'bob'
enddef
def Test_echoerr_cmd()
- # TODO: write this test
+ try
+ echoerr 'something' 'wrong' # comment
+ catch
+ assert_match('something wrong', v:exception)
+ endtry
enddef
def Test_for_outside_of_function()
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 700,
/**/
699,
/**/
}
else
{
- int save_did_emsg = did_emsg;
-
SOURCING_LNUM = iptr->isn_lnum;
emsg(ga.ga_data);
- if (!force_abort)
- // We don't want to abort following
- // commands, restore did_emsg.
- did_emsg = save_did_emsg;
}
}
}