You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unit tests fail if terminal window is not exactly 80 characters wide #593
#589 adds a check for sut.Settings.MaximumDisplayWidth.Should().Be(80), but that will fail if you run dotnet test in a Linux terminal window that's a different size.
To Reproduce:
Clone the repo
Open a Linux terminal window and don't resize it, so it's 80x24 (the usual default)
Run dotnet test. It works.
Resize the terminal window so it's one character wider
Run dotnet test. It fails with "Expected sut.Settings.MaximumDisplayWidth to be 80, but found 81."
Note that on my dev laptop, I habitually run terminal windows at maximum screen width, so for me the exception was "Expected sut.Settings.MaximumDisplayWidth to be 80, but found 272."
Solution:
Don't assume any particular value for MaximumDisplayWidth; just check that it's greater than 1.
Activity
rmunn commentedon Mar 12, 2020
The problem line is this one, BTW.
moh-hassan commentedon Mar 12, 2020
Thanks @rmunn
I fixed the issue with a PR .
fix issue #593 (#597)
moh-hassan commentedon Mar 12, 2020
Linux is added as other CI and all tests passed in Ubuntu 18.04
rmunn commentedon Mar 13, 2020
I can verify that #597 fixes this issue on my development laptop.