Reqnroll Version
3.3.1
Which test runner are you using?
NUnit
Test Runner Version Number
n/a
.NET Implementation
.NET 8.0
Test Execution Method
Visual Studio Test Explorer
Content of reqnroll.json configuration file
n/a
Issue Description
Generated *.feature.cs files should contain identical string literal content regardless of the platform where code generation occurs. The code generator should respect and follow the line ending configuration of the source *.feature files as defined in .gitattributes, using consistent escape sequences in C# string literals (\n vs \r\n) across all platforms.
Steps to Reproduce
Create a .gitattributes file:
# Explicitly declare feature files to always be normalized and converted to LF on checkout
*.feature text eol=lf
Create a feature file:
Feature: Testing line breaks
This is
a description
with line breaks
Observe the generated code on Mac:
private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "Testing line breaks", "This is\na description\nwith line breaks", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages());
Observe the generated code on Windows:
private static global::Reqnroll.FeatureInfo featureInfo = new global::Reqnroll.FeatureInfo(new global::System.Globalization.CultureInfo("en-US"), "Features", "Testing line breaks", "This is\r\na description\r\nwith line breaks", global::Reqnroll.ProgrammingLanguage.CSharp, featureTags, InitializeCucumberMessages());
I would expect that since the line breaks are normalized to \n in the feature file (even on Windows), the generated code would be consistent across platforms.
Link to Repro Project
No response
Reqnroll Version
3.3.1
Which test runner are you using?
NUnit
Test Runner Version Number
n/a
.NET Implementation
.NET 8.0
Test Execution Method
Visual Studio Test Explorer
Content of reqnroll.json configuration file
n/a
Issue Description
Generated
*.feature.csfiles should contain identical string literal content regardless of the platform where code generation occurs. The code generator should respect and follow the line ending configuration of the source*.featurefiles as defined in.gitattributes, using consistent escape sequences in C# string literals (\nvs\r\n) across all platforms.Steps to Reproduce
Create a
.gitattributesfile:Create a feature file:
Observe the generated code on Mac:
Observe the generated code on Windows:
I would expect that since the line breaks are normalized to
\nin the feature file (even on Windows), the generated code would be consistent across platforms.Link to Repro Project
No response