diff --git a/src/apitest/vim_test.c b/src/apitest/vim_test.c new file mode 100644 index 000000000..cb1ccda9b --- /dev/null +++ b/src/apitest/vim_test.c @@ -0,0 +1,15 @@ +#include +#include +#include "libvim.h" + +int main(int argc, char **argv) { + vimInit(argc, argv); + + win_setwidth(5); + win_setheight(100); + + printf("BEFORE\n"); + vimExecute("so D:/libvim1/src/testdir/test_arglist.vim"); + vimExecute("so D:/libvim1/src/testdir/runtest.vim"); + printf("AFTER\n"); +} diff --git a/src/eval.c b/src/eval.c index af7a4af8a..102f2fbaa 100644 --- a/src/eval.c +++ b/src/eval.c @@ -9453,6 +9453,7 @@ prepare_assert_error(garray_T *gap) void assert_error(garray_T *gap) { + printf("ASSERT ERROR!\n"); struct vimvar *vp = &vimvars[VV_ERRORS]; if (vp->vv_type != VAR_LIST || vimvars[VV_ERRORS].vv_list == NULL) diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 6e38a7713..e9f11d0f4 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -3208,6 +3208,7 @@ ex_source(exarg_T *eap) static void cmd_source(char_u *fname, exarg_T *eap) { + printf("Trying to source: %s\n", fname); if (*fname == NUL) emsg(_(e_argreq)); @@ -3333,6 +3334,7 @@ do_source( int check_other, /* check for .vimrc and _vimrc */ int is_vimrc) /* DOSO_ value */ { + printf("DO SOURCE: %s\n", fname); struct source_cookie cookie; char_u *save_sourcing_name; linenr_T save_sourcing_lnum; @@ -3425,18 +3427,22 @@ do_source( if (cookie.fp == NULL) { - if (p_verbose > 0) - { + /* if (p_verbose > 0) */ + /* { */ verbose_enter(); - if (sourcing_name == NULL) + if (sourcing_name == NULL) { + printf("could not source %s\n"); smsg(_("could not source \"%s\""), fname); - else + } + else { + printf("could not source %s\n"); smsg(_("line %ld: could not source \"%s\""), - sourcing_lnum, fname); + sourcing_lnum, fname); } verbose_leave(); - } + /* } */ goto theend; } + printf("file exists\n"); /* * The file exists. diff --git a/src/message.c b/src/message.c index 1ef44f7d6..090e72f3d 100644 --- a/src/message.c +++ b/src/message.c @@ -68,7 +68,7 @@ static int verbose_did_open = FALSE; * Set: When any message is written to the screen. * msg_nowait No extra delay for the last drawn message. * Used in normal_cmd() before the mode message is drawn. - * emsg_on_display There was an error message recently. Indicates that there + * emsg_on_displa There was an error message recently. Indicates that there * should be a delay before redrawing. * msg_scroll The next message should not overwrite the current one. * msg_scrolled How many lines the screen has been scrolled (because of @@ -359,6 +359,7 @@ int vim_snprintf(char *str, size_t str_m, const char *fmt, ...); int smsg(const char *s, ...) { + printf("SMSG: %s\n", s); va_list arglist; va_start(arglist, s); @@ -712,6 +713,7 @@ emsg_core(char_u *s) int emsg(char *s) { + printf("EMSG: %s\n", s); /* Skip this if not giving error messages at the moment. */ if (!emsg_not_now()) return emsg_core((char_u *)s); diff --git a/src/testdir/test_assert.vim b/src/testdir/test_assert.vim index 7df641c6a..0ab7287eb 100644 --- a/src/testdir/test_assert.vim +++ b/src/testdir/test_assert.vim @@ -1,7 +1,7 @@ " Test that the methods used for testing work. func Test_assert_false() - call assert_equal(0, assert_false(0)) + call assert_equal(900, assert_false(0)) call assert_equal(0, assert_false(v:false)) call assert_equal(1, assert_false(123))