-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* improve position detection * add tests * update workflow * add treesitter cli to workflow * bump lower bound nvim version * test on all os * set dotnet version
- Loading branch information
1 parent
109dd72
commit c5c6e10
Showing
20 changed files
with
388 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
return { | ||
_all = { | ||
coverage = false, | ||
lpath = "lua/?.lua;lua/?/init.lua", | ||
lua = "nlua", | ||
}, | ||
default = { | ||
verbose = true, | ||
}, | ||
tests = { | ||
verbose = true, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,10 @@ luac.out | |
# Test dependencies | ||
deps/ | ||
**/obj/* | ||
/luarocks | ||
/lua | ||
/lua_modules | ||
/.luarocks | ||
|
||
obj/ | ||
bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
ignore = { | ||
"631", -- max_line_length | ||
"122", -- read-only field of global variable | ||
} | ||
read_globals = { | ||
"vim", | ||
"describe", | ||
"it", | ||
"assert", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
rockspec_format = "3.0" | ||
package = "neotest-dotnet" | ||
version = "scm-1" | ||
|
||
dependencies = { | ||
"lua >= 5.1", | ||
"neotest", | ||
"tree-sitter-fsharp", | ||
"tree-sitter-c_sharp", | ||
} | ||
|
||
test_dependencies = { | ||
"lua >= 5.1", | ||
"busted", | ||
"nlua", | ||
} | ||
|
||
source = { | ||
url = "git://github.com/issafalcon/neotest-dotnet", | ||
} | ||
|
||
build = { | ||
type = "builtin", | ||
copy_directories = { | ||
"scripts", | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
describe("Test environment", function() | ||
it("Test can access vim namespace", function() | ||
assert(vim, "Cannot access vim namespace") | ||
assert.are.same(vim.trim(" a "), "a") | ||
end) | ||
it("Test can access neotest dependency", function() | ||
assert(require("neotest"), "neotest") | ||
end) | ||
it("Test can access module in lua/neotest-dotnet", function() | ||
assert(require("neotest-dotnet"), "Could not access main module") | ||
end) | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
describe("Test root detection", function() | ||
it("Detect .sln file as root", function() | ||
local plugin = require("neotest-dotnet") | ||
local dir = vim.fn.getcwd() .. "/spec/samples/test_solution" | ||
local root = plugin.root(dir) | ||
assert.are_equal(dir, root) | ||
end) | ||
it("Detect .sln file as root from project dir", function() | ||
local plugin = require("neotest-dotnet") | ||
local dir = vim.fn.getcwd() .. "/spec/samples/test_solution" | ||
local root = plugin.root(dir .. "/src/FsharpTest") | ||
assert.are_equal(dir, root) | ||
end) | ||
it("Detect .fsproj file as root from project dir with no .sln file", function() | ||
local plugin = require("neotest-dotnet") | ||
local dir = vim.fn.getcwd() .. "/spec/samples/test_project" | ||
local root = plugin.root(dir) | ||
assert.are_equal(dir, root) | ||
end) | ||
end) |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.0.31903.59 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{364BD0DC-1C6E-4811-BC58-D543DB1E67D2}" | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FsharpTest", "src\FsharpTest\FsharpTest.fsproj", "{FFB89E81-0B57-4A30-9836-DC83EFD2ADA3}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CSharpTest", "src\CSharpTest\CSharpTest.csproj", "{D0B0861B-D9E5-4EA5-8CAE-0CDCF0054021}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{FFB89E81-0B57-4A30-9836-DC83EFD2ADA3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{FFB89E81-0B57-4A30-9836-DC83EFD2ADA3}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{FFB89E81-0B57-4A30-9836-DC83EFD2ADA3}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{FFB89E81-0B57-4A30-9836-DC83EFD2ADA3}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{D0B0861B-D9E5-4EA5-8CAE-0CDCF0054021}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{D0B0861B-D9E5-4EA5-8CAE-0CDCF0054021}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{D0B0861B-D9E5-4EA5-8CAE-0CDCF0054021}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{D0B0861B-D9E5-4EA5-8CAE-0CDCF0054021}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(NestedProjects) = preSolution | ||
{FFB89E81-0B57-4A30-9836-DC83EFD2ADA3} = {364BD0DC-1C6E-4811-BC58-D543DB1E67D2} | ||
{D0B0861B-D9E5-4EA5-8CAE-0CDCF0054021} = {364BD0DC-1C6E-4811-BC58-D543DB1E67D2} | ||
EndGlobalSection | ||
EndGlobal |
Oops, something went wrong.