From 6254b0fd3bc725705020192dc9e35635136b9929 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 4 Sep 2022 16:13:37 +0200 Subject: ci(tests): don't skip parsers on functionaltest Treesitter parsers are now a mandatory part of the installation and should be tested on all platforms. Remove `pending_c_parser` helper. --- test/functional/treesitter/parser_spec.lua | 3 --- 1 file changed, 3 deletions(-) (limited to 'test/functional/treesitter/parser_spec.lua') diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua index 7f3b0e770a..ccbd55df0e 100644 --- a/test/functional/treesitter/parser_spec.lua +++ b/test/functional/treesitter/parser_spec.lua @@ -5,13 +5,11 @@ local eq = helpers.eq local insert = helpers.insert local exec_lua = helpers.exec_lua local feed = helpers.feed -local pending_c_parser = helpers.pending_c_parser before_each(clear) describe('treesitter parser API', function() clear() - if pending_c_parser(pending) then return end it('parses buffer', function() if helpers.pending_win32(pending) then return end @@ -249,7 +247,6 @@ void ui_refresh(void) end) it('supports getting text of multiline node', function() - if pending_c_parser(pending) then return end insert(test_text) local res = exec_lua([[ local parser = vim.treesitter.get_parser(0, "c") -- cgit 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/treesitter/parser_spec.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/functional/treesitter/parser_spec.lua') diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua index ccbd55df0e..22348c7e20 100644 --- a/test/functional/treesitter/parser_spec.lua +++ b/test/functional/treesitter/parser_spec.lua @@ -5,6 +5,8 @@ local eq = helpers.eq local insert = helpers.insert local exec_lua = helpers.exec_lua local feed = helpers.feed +local iswin = helpers.iswin +local skip = helpers.skip before_each(clear) @@ -12,7 +14,7 @@ describe('treesitter parser API', function() clear() it('parses buffer', function() - if helpers.pending_win32(pending) then return end + skip(iswin()) insert([[ int main() { @@ -684,7 +686,7 @@ int x = INT_MAX; end) it("should not inject bad languages", function() - if helpers.pending_win32(pending) then return end + skip(iswin()) exec_lua([=[ vim.treesitter.add_directive("inject-bad!", function(match, _, _, pred, metadata) metadata.language = "{" -- cgit From 211c568e6452e62b119ac4b987ff47b9174ec9ad Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 15 Nov 2022 12:33:30 +0100 Subject: test: don't skip parser_spec on windows (#20294) --- test/functional/treesitter/parser_spec.lua | 2 -- 1 file changed, 2 deletions(-) (limited to 'test/functional/treesitter/parser_spec.lua') diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua index 22348c7e20..c6ddf812be 100644 --- a/test/functional/treesitter/parser_spec.lua +++ b/test/functional/treesitter/parser_spec.lua @@ -14,8 +14,6 @@ describe('treesitter parser API', function() clear() it('parses buffer', function() - skip(iswin()) - insert([[ int main() { int x = 3; -- 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/treesitter/parser_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/treesitter/parser_spec.lua') diff --git a/test/functional/treesitter/parser_spec.lua b/test/functional/treesitter/parser_spec.lua index c6ddf812be..f006ad4539 100644 --- a/test/functional/treesitter/parser_spec.lua +++ b/test/functional/treesitter/parser_spec.lua @@ -5,7 +5,7 @@ local eq = helpers.eq local insert = helpers.insert local exec_lua = helpers.exec_lua local feed = helpers.feed -local iswin = helpers.iswin +local is_os = helpers.is_os local skip = helpers.skip before_each(clear) @@ -684,7 +684,7 @@ int x = INT_MAX; end) it("should not inject bad languages", function() - skip(iswin()) + skip(is_os('win')) exec_lua([=[ vim.treesitter.add_directive("inject-bad!", function(match, _, _, pred, metadata) metadata.language = "{" -- cgit