Repro
On Debian 12 (bookworm) with .NET SDK 10.0.101 (runtimes include Microsoft.NETCore.App 8.0.20) and LANG=en_US.UTF-8, running:
dotnet test tests/CsvHelper.Tests/CsvHelper.Tests.csproj -c Release -f net8.0
on master (33970e5183383bdac1fbce3b3fbcdf46b318ca52) consistently fails with 4 tests.
Failing tests
CsvHelper.Tests.TypeConversion.TypeConverterFactoryTests.WriteTypeConverterGenericInt
CsvHelper.Tests.TypeConversion.TypeConverterFactoryTests.WriteTypeConverterFactory
- expected string contains
\n, but actual output contains \r\n
CsvHelper.Tests.Mappings.ConstructorParameter.CultureInfoAttributeTests.CsvConfiguration_FromType_InvalidAttribute_ThrowsCultureNotFoundException
CsvConfiguration.FromAttributes<InvalidAttribute>() does not throw on this environment (seems CultureInfo.GetCultureInfo("invalid") resolves instead of throwing)
CsvHelper.Tests.Writing.MultipleFieldsFromOnePropertyTests.WriteMultipleFieldsFromSinglePropertyTest
- expected
12:00:00 AM (normal space), but actual contains a narrow no-break space before AM (12:00:00\u202FAM)
Notes / hypotheses
- The newline failures look like the test
expected is built from a raw string literal whose line endings depend on checkout, while CsvWriter seems to default to CRLF. Maybe build expected via csv.Configuration.NewLine / cw.Configuration.NewLine instead (like other tests).
- The DateTime formatting difference looks like ICU vs Windows NLS culture-data differences for
en-US; building expected from DateTime.ToString(culture) or normalizing whitespace could make it platform-neutral.
- The invalid-culture test may need to account for ICU behavior (or use a different invalid culture name that fails consistently).
Happy to open a PR if you'd like any of these adjusted; wanted to check first whether Linux net8.0 test runs are expected to pass.
Repro
On Debian 12 (bookworm) with .NET SDK 10.0.101 (runtimes include
Microsoft.NETCore.App 8.0.20) andLANG=en_US.UTF-8, running:dotnet test tests/CsvHelper.Tests/CsvHelper.Tests.csproj -c Release -f net8.0on
master(33970e5183383bdac1fbce3b3fbcdf46b318ca52) consistently fails with 4 tests.Failing tests
CsvHelper.Tests.TypeConversion.TypeConverterFactoryTests.WriteTypeConverterGenericIntCsvHelper.Tests.TypeConversion.TypeConverterFactoryTests.WriteTypeConverterFactory\n, but actual output contains\r\nCsvHelper.Tests.Mappings.ConstructorParameter.CultureInfoAttributeTests.CsvConfiguration_FromType_InvalidAttribute_ThrowsCultureNotFoundExceptionCsvConfiguration.FromAttributes<InvalidAttribute>()does not throw on this environment (seemsCultureInfo.GetCultureInfo("invalid")resolves instead of throwing)CsvHelper.Tests.Writing.MultipleFieldsFromOnePropertyTests.WriteMultipleFieldsFromSinglePropertyTest12:00:00 AM(normal space), but actual contains a narrow no-break space beforeAM(12:00:00\u202FAM)Notes / hypotheses
expectedis built from a raw string literal whose line endings depend on checkout, whileCsvWriterseems to default to CRLF. Maybe build expected viacsv.Configuration.NewLine/cw.Configuration.NewLineinstead (like other tests).en-US; building expected fromDateTime.ToString(culture)or normalizing whitespace could make it platform-neutral.Happy to open a PR if you'd like any of these adjusted; wanted to check first whether Linux net8.0 test runs are expected to pass.