mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-03 21:36:36 +00:00
Different unit test results between Windows and Linux #362
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mlaily on GitHub (Apr 26, 2020).
Running
dotnet teston Windows and on Ubuntu (WSL2) with the same dotnet sdk does not yield the same result. Some tests related to relative and absolute uris don't pass on Linux!(Tests on a clean 0.20.0 working directory (
3ef1d735d5))Windows:
Ubuntu (WSL2):
I tried to debug the linux tests with VS Code and the Remote WSL extension but I didn't manage to make it work properly, so I didn't go much further...
Any idea why it does that? Should we worry?
Bonus question: what's the recommended way to run unit tests for Markdig? I installed the NUnit test runner, but tests still won't run inside Visual Studio, because of
An exception occurred while invoking executor 'executor://nunit3testexecutor/': Incorrect format for TestCaseFilter Error: Missing '('. Specify the correct format and try again. Note that the incorrect format can lead to no test getting executed.. After some googling, it seems to be a recurring bug with NUnit... should I stick todotnet test?@mlaily commented on GitHub (Apr 26, 2020):
Ok, I found the cause.
Uricannot be trusted: it behaves differently on Windows and Unix -_-'See https://github.com/dotnet/runtime/issues/22718
and the bug in markdig:
8acf5a548e/src/Markdig/Renderers/HtmlRenderer.cs (L208)I'll try to make a PR...
@mlaily commented on GitHub (Apr 26, 2020):
Thanks for the merge.
@xoofx @MihaZupan Could you also please answer my other question when you have two minutes? :)
@MihaZupan commented on GitHub (Apr 26, 2020):
Tests used to work fine in VS, I don't know where it went wrong and I haven't looked into it. For peace of mind I run tests from the command line. It would be worth looking into what's actually happening with VS.
Interesting thing is that while the Text Explorer doesn't seem to work, the live code coverage in VS enterprise runs them just fine (after a minor tweak) 🤷♂️
@mlaily commented on GitHub (Apr 26, 2020):
Thanks, that's useful to know.
For what it's worth, executing individual tests seem to work properly too, but I can't run the whole batch at once...
I'll probably stick to the command line...