From 736c36c02f316c979da363c5120495179a2b6c2a Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Sun, 13 Nov 2022 14:52:19 +0100 Subject: 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())`. --- test/functional/provider/perl_spec.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/functional/provider/perl_spec.lua') diff --git a/test/functional/provider/perl_spec.lua b/test/functional/provider/perl_spec.lua index aff5e36e24..4c5c3ece15 100644 --- a/test/functional/provider/perl_spec.lua +++ b/test/functional/provider/perl_spec.lua @@ -9,6 +9,8 @@ local curbufmeths = helpers.curbufmeths local insert = helpers.insert local expect = helpers.expect local feed = helpers.feed +local iswin = helpers.iswin +local skip = helpers.skip do clear() @@ -24,7 +26,7 @@ before_each(function() end) describe('legacy perl provider', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) it('feature test', function() eq(1, eval('has("perl")')) @@ -68,7 +70,7 @@ describe('legacy perl provider', function() end) describe('perl provider', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) teardown(function () os.remove('Xtest-perl-hello.pl') os.remove('Xtest-perl-hello-plugin.pl') -- cgit From 5eb5f4948826e9d47685ea9e257409cc3e693614 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 22 Nov 2022 01:13:30 +0100 Subject: test: simplify platform detection (#21020) Extend the capabilities of is_os to detect more platforms such as freebsd and openbsd. Also remove `iswin()` helper function as it can be replaced by `is_os("win")`. --- test/functional/provider/perl_spec.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/provider/perl_spec.lua') diff --git a/test/functional/provider/perl_spec.lua b/test/functional/provider/perl_spec.lua index 4c5c3ece15..ce92831f4c 100644 --- a/test/functional/provider/perl_spec.lua +++ b/test/functional/provider/perl_spec.lua @@ -9,7 +9,7 @@ local curbufmeths = helpers.curbufmeths local insert = helpers.insert local expect = helpers.expect local feed = helpers.feed -local iswin = helpers.iswin +local is_os = helpers.is_os local skip = helpers.skip do @@ -26,7 +26,7 @@ before_each(function() end) describe('legacy perl provider', function() - skip(iswin()) + skip(is_os('win')) it('feature test', function() eq(1, eval('has("perl")')) @@ -70,7 +70,7 @@ describe('legacy perl provider', function() end) describe('perl provider', function() - skip(iswin()) + skip(is_os('win')) teardown(function () os.remove('Xtest-perl-hello.pl') os.remove('Xtest-perl-hello-plugin.pl') -- cgit