Hi, @LukeMarlin. I'm glad dotnet test is running, even though it fails.
I am not sure about the best approach for updating these tests. Your proposed one looks like it would work, but we also use
$@ strings which would make things more complicated.
It would be possible to add the
Replace at the end of the
$ string or
$@ string rather than converting to use a
Perhaps nicer would be to add a utility method in
FakeItEasy.Tests.TestHelpers to do the conversion. Something like
var expectedMessage = Multiline( @"1: Fake call 1 2: Fake call 2 3: Fake call 3 4: Fake call 4 5: Fake call 5 6: Fake call 6 7: Fake call 7 8: Fake call 8 9: Fake call 9 10: Fake call 10");
And it could adust the line endings if needed.
Alternatively, I suppose we could have the repo adjust its line endings to be native when checked out, but that makes me nervous.
I'm not trying your build scripts yet
I don't expect major difficulties here. The build.cmd just invokes
dotnet, so it should be easy to translate to bash.
Doesn't FluentAssertions have an option to ignore differences in line breaks?
I couldn't find it.
The build.cmd just invokes dotnet, so it should be easy to translate to bash.
It's true. Even tried this approach yesterday, but I had only a core 3.0 preview on my WSL, so things did not go well!
MatchEquivalentOfwill ignore ends of lines and case, which is close. Looking to see if we can turn on only one of those switches!
autocrlfprobably comes into play here too
NormalizeLineEndings-type extension method or specialized FluentAssertion comparers. The latter is probably slightly cleaner as we don't have to pollute
string, but it would just be in the tests, and I think not such a big deal.
Okay. Customized FluentAssertions it is, not unlike
@LukeMarlin, is this something you're comfortable with/interested in? I'd be happy to work on the change if not, but I realize it's blocking you, so maybe the timing works better if you investigate?
Whatever you prefer.
System.Environment.NewLine. Or is this even necessary? I've been out of the Mac game for a while. Bare
\rs have gone out of fashion, right?