Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

616b2f feature/csharp #12

Merged
merged 8 commits into from May 6, 2022
Merged

616b2f feature/csharp #12

merged 8 commits into from May 6, 2022

Conversation

klen
Copy link
Owner

@klen klen commented May 6, 2022

No description provided.

@klen klen merged commit 486df1e into main May 6, 2022
@klen klen deleted the 616b2f-feature/csharp branch May 6, 2022 09:19
assert.are.same({ "dotnet", "test" }, vim.g.test_latest.cmd)
end)

it("run file", function()
Copy link
Contributor

@616b2f 616b2f May 6, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unfortunately that does not work like that, because you can not pass a test file here you can only pass proj files or solution files here see https://docs.microsoft.com/en-us/dotnet/core/testing/selective-unit-tests?pivots=mstest
for more details.

That's why I concatenated multiple TestFunction names with a "|" to run all tests inside a TestFile. But for that we need a function to discover TestFunctions inside that TestFile, that why I separated it into a different function that we use for run the nearest test.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. But the function breaks other runners. Looks like we need to refactor runner to support such unusual cases. I'll check it later.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@616b2f Btw thank you for your support. I'm not using c# or go so the feedback it precious

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@klen that's what I thought :D. I glad you have such a plugin and I am happy to support you for the csharp integration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. But the function breaks other runners. Looks like we need to refactor runner to support such unusual cases. I'll check it later.

I belive also that the test for go-test runner is not working, because in practice "TestFile" doesn't worked for me.

(
(
function_declaration name: (identifier) @test-name
(#match? @test-name "^(Test|Example)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example prefix is not a right prefix for Tests see https://pkg.go.dev/cmd/go#hdr-Testing_functions

It is only a Example function to be tested, as described there. We could add "Benchmark" and "Fuzz" prefixes to be complete here

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@616b2f Thank you, fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants