Version number: 3.0.132-beta
{
"bindingCulture": {
"language": "en-us"
},
"language": {
"feature": "en-us"
},
"plugins": [],
"stepAssemblies": [
{
"assembly": "BDD.NetCore.Steps.Adapters"
},
{
"assembly": "BDD.NetCore.Launcher"
}
]
}
None
There's an unnecessary source code change when switching to Mac from Windows and vice versa. It's related to newline
MacOS: In order to try out algorithms\n\t vs Windows:In order to try out algorithms\r\n\t
Suggested workaround: use ${Environment.NewLine} in the generated code
PS: Will be happy to pr
@SabotageAndi
Perhaps I am overlooking currently something, but won't be the problem still exists when using Environment.NewLine? On Windows it is \r\n, on MacOS it's \n. So there will be always a different in the generated file.
Additionally, the code is generated via CodeDom. We don't write it manually into the file. So I am not sure if we can adjust that.
Is the Line-Ending problem not something, that could be solved with git config?
@SabotageAndi I see if I can find time for a pull-request to show you what I mean
@SabotageAndi It's not a line-ending problem. It's the specific mentioning of \r\n in the generated code. I checked this issue and it looks like SpecFlow really has very little influence over this as this isCodeDom feature.
I guess this issue can be closed for now or at least excluded from 3.0
Thanks.
@godrose Are the \r\nwhen you generate the code-behinds on a Mac? That would meanSystem.CodeDomisn't usingEnvironment.NewLinebut\n\r`.
We could handle this perhaps here: https://github.com/techtalk/SpecFlow/blob/master/SpecFlow.Tools.MsBuild.Generation/FeatureCodeBehindGenerator.cs#L28
We replace there \r\n with Environment.NewLine. On Windows this does nothing and on Mac it is replacing it to the right line ending.
@SabotageAndi To illustrate this

@godrose Are the
\r\nwhen you generate the code-behinds on a Mac? That would meanSystem.CodeDomisn't usingEnvironment.NewLinebut\n\r`.We could handle this perhaps here: https://github.com/techtalk/SpecFlow/blob/master/SpecFlow.Tools.MsBuild.Generation/FeatureCodeBehindGenerator.cs#L28
We replace there\r\nwithEnvironment.NewLine. On Windows this does nothing and on Mac it is replacing it to the right line ending.
This looks like the perfect place!
@godrose When do we get the PR ;-)
@SabotageAndi Working on it ;)
I'm unable to compile the solution on Mac. Is there any specific configuration I should pick or Debug should be enough?
yeah, I didn't get it to build on Mac, because we compile for full framework.
At the Gherkin parser, the netfx.props (https://github.com/techtalk/SpecFlow/blob/master/netfx.props) was enough to get it to work.
But it looks like not for SpecFlow. After struggling with this for 2 days, I stopped looking at it.
@SabotageAndi Thanks. I will try to find another solution