test: introduce skip() #21010

This is essentially a convenience wrapper around the `pending()`
function, similar to `skip_fragile()` but more general-purpose.

Also remove `pending_win32` function as it can be replaced by
`skip(iswin())`.
This commit is contained in:
dundargoc
2022-11-13 14:52:19 +01:00
committed by GitHub
parent 0a96f18ed7
commit 736c36c02f
34 changed files with 118 additions and 121 deletions

View File

@@ -30,6 +30,7 @@ local exec_lua = helpers.exec_lua
local exc_exec = helpers.exc_exec
local insert = helpers.insert
local expect_exit = helpers.expect_exit
local skip = helpers.skip
local pcall_err = helpers.pcall_err
local format_string = helpers.format_string
@@ -2729,7 +2730,7 @@ describe('API', function()
eq({}, meths.get_runtime_file("foobarlang/", true))
end)
it('can handle bad patterns', function()
if helpers.pending_win32(pending) then return end
skip(iswin())
eq("Vim:E220: Missing }.", pcall_err(meths.get_runtime_file, "{", false))