0
0
mirror of https://github.com/vim/vim.git synced 2025-10-13 06:54:15 -04:00

patch 8.2.0047: cannot skip tests for specific MS-Windows platform

Problem:    Cannot skip tests for specific MS-Windows platform.
Solution:   Add windowsversion().
This commit is contained in:
Bram Moolenaar
2019-12-27 13:49:24 +01:00
parent 5666fcd0bd
commit 0c1e3744ff
7 changed files with 39 additions and 6 deletions

View File

@@ -276,6 +276,7 @@ static void f_type(typval_T *argvars, typval_T *rettv);
static void f_virtcol(typval_T *argvars, typval_T *rettv);
static void f_visualmode(typval_T *argvars, typval_T *rettv);
static void f_wildmenumode(typval_T *argvars, typval_T *rettv);
static void f_windowsversion(typval_T *argvars, typval_T *rettv);
static void f_wordcount(typval_T *argvars, typval_T *rettv);
static void f_xor(typval_T *argvars, typval_T *rettv);
@@ -864,6 +865,7 @@ static funcentry_T global_functions[] =
{"win_splitmove", 2, 3, FEARG_1, f_win_splitmove},
{"winbufnr", 1, 1, FEARG_1, f_winbufnr},
{"wincol", 0, 0, 0, f_wincol},
{"windowsversion", 0, 0, 0, f_windowsversion},
{"winheight", 1, 1, FEARG_1, f_winheight},
{"winlayout", 0, 1, FEARG_1, f_winlayout},
{"winline", 0, 0, 0, f_winline},
@@ -8407,6 +8409,16 @@ f_wildmenumode(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
#endif
}
/*
* "windowsversion()" function
*/
static void
f_windowsversion(typval_T *argvars UNUSED, typval_T *rettv UNUSED)
{
rettv->v_type = VAR_STRING;
rettv->vval.v_string = vim_strsave((char_u *)windowsVersion);
}
/*
* "wordcount()" function
*/