diff --git a/src/Make_cyg_ming.mak b/src/Make_cyg_ming.mak index 5c7332e1c5..026c966bfe 100644 --- a/src/Make_cyg_ming.mak +++ b/src/Make_cyg_ming.mak @@ -693,7 +693,6 @@ ifneq ($(NETBEANS),yes) LIB += -lwsock32 endif endif -endif ifeq ($(DIRECTX),yes) # Only allow DIRECTX for a GUI build. diff --git a/src/eval.c b/src/eval.c index fa7510fb63..640a5456ab 100644 --- a/src/eval.c +++ b/src/eval.c @@ -10578,6 +10578,10 @@ f_empty(argvars, rettv) n = argvars[0].vval.v_dict == NULL || argvars[0].vval.v_dict->dv_hashtab.ht_used == 0; break; + case VAR_SPECIAL: + n = argvars[0].vval.v_number != VVAL_TRUE; + break; + default: EMSG2(_(e_intern2), "f_empty()"); n = 0; @@ -12996,7 +13000,8 @@ f_glob2regpat(argvars, rettv) char_u *pat = get_tv_string_chk(&argvars[0]); rettv->v_type = VAR_STRING; - rettv->vval.v_string = file_pat_to_reg_pat(pat, NULL, NULL, FALSE); + rettv->vval.v_string = (pat == NULL) + ? NULL : file_pat_to_reg_pat(pat, NULL, NULL, FALSE); } /* diff --git a/src/proto/gui_w32.pro b/src/proto/gui_w32.pro index 6752d916fe..57c6238f87 100644 --- a/src/proto/gui_w32.pro +++ b/src/proto/gui_w32.pro @@ -96,5 +96,5 @@ void gui_mch_post_balloon(BalloonEval *beval, char_u *mesg); BalloonEval *gui_mch_create_beval_area(void *target, char_u *mesg, void (*mesgCB)(BalloonEval *, int), void *clientData); void gui_mch_destroy_beval_area(BalloonEval *beval); void netbeans_draw_multisign_indicator(int row); -void netbeans_init_winsock(void); +void channel_init_winsock(void); /* vim: set ft=c : */ diff --git a/src/testdir/test_alot.vim b/src/testdir/test_alot.vim index aceb073f69..97454335de 100644 --- a/src/testdir/test_alot.vim +++ b/src/testdir/test_alot.vim @@ -5,6 +5,7 @@ source test_backspace_opt.vim source test_cursor_func.vim source test_delete.vim source test_expand.vim +source test_glob2regpat.vim source test_json.vim source test_lispwords.vim source test_menu.vim diff --git a/src/testdir/test_glob2regpat.vim b/src/testdir/test_glob2regpat.vim new file mode 100644 index 0000000000..250ab2746c --- /dev/null +++ b/src/testdir/test_glob2regpat.vim @@ -0,0 +1,10 @@ +" Test glob2regpat() + +func Test_invalid() + call assert_fails('call glob2regpat(1.33)', 'E806:') +endfunc + +func Test_valid() + call assert_equal('^foo\.', glob2regpat('foo.*')) + call assert_equal('\.vim$', glob2regpat('*.vim')) +endfunc diff --git a/src/testdir/test_viml.vim b/src/testdir/test_viml.vim index f32331a61c..3c140c84d7 100644 --- a/src/testdir/test_viml.vim +++ b/src/testdir/test_viml.vim @@ -55,16 +55,26 @@ endfunction " ExecAsScript - Source a temporary script made from a function. {{{2 " " Make a temporary script file from the function a:funcname, ":source" it, and -" delete it afterwards. +" delete it afterwards. However, if an exception is thrown the file may remain, +" the caller should call DeleteTheScript() afterwards. +let s:script_name = '' function! ExecAsScript(funcname) " Make a script from the function passed as argument. - let script = MakeScript(a:funcname) + let s:script_name = MakeScript(a:funcname) " Source and delete the script. - exec "source" script - call delete(script) + exec "source" s:script_name + call delete(s:script_name) + let s:script_name = '' endfunction +function! DeleteTheScript() + if s:script_name + call delete(s:script_name) + let s:script_name = '' + endif +endfunc + com! -nargs=1 -bar ExecAsScript call ExecAsScript() @@ -143,6 +153,7 @@ func Test_endwhile_script() XpathINIT ExecAsScript T1_F Xpath 'F' + call DeleteTheScript() try ExecAsScript T1_G @@ -152,6 +163,7 @@ func Test_endwhile_script() Xpath 'x' endtry Xpath 'G' + call DeleteTheScript() call assert_equal('abcFhijxG', g:Xpath) endfunc @@ -260,6 +272,7 @@ function Test_finish() XpathINIT ExecAsScript T4_F Xpath '5' + call DeleteTheScript() call assert_equal('ab3e3b2c25', g:Xpath) endfunction @@ -987,6 +1000,11 @@ func Test_type() call assert_equal(v:true, eval(string(v:true))) call assert_equal(v:none, eval(string(v:none))) call assert_equal(v:null, eval(string(v:null))) + + call assert_true(empty(v:false)) + call assert_false(empty(v:true)) + call assert_true(empty(v:null)) + call assert_true(empty(v:none)) endfunc "------------------------------------------------------------------------------- diff --git a/src/testdir/test_writefile.in b/src/testdir/test_writefile.in index f2dc7d50bb..6b354c510a 100644 --- a/src/testdir/test_writefile.in +++ b/src/testdir/test_writefile.in @@ -13,6 +13,7 @@ STARTTEST :$put =readfile(f) :1 delete _ :w! test.out +:call delete(f) :qa! ENDTEST diff --git a/src/version.c b/src/version.c index dbeb7ef8dd..425ad3f55d 100644 --- a/src/version.c +++ b/src/version.c @@ -106,6 +106,11 @@ static char *(features[]) = #else "-byte_offset", #endif +#ifdef FEAT_CHANNEL + "+channel", +#else + "-channel", +#endif #ifdef FEAT_CINDENT "+cindent", #else @@ -756,6 +761,18 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1180, +/**/ + 1179, +/**/ + 1178, +/**/ + 1177, +/**/ + 1176, +/**/ + 1175, /**/ 1174, /**/