-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
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.0on master (33970e5183383bdac1fbce3b3fbcdf46b318ca52) consistently fails with 4 tests.
Failing tests
CsvHelper.Tests.TypeConversion.TypeConverterFactoryTests.WriteTypeConverterGenericIntCsvHelper.Tests.TypeConversion.TypeConverterFactoryTests.WriteTypeConverterFactory- expected string contains
\n, but actual output contains\r\n
- expected string contains
CsvHelper.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.WriteMultipleFieldsFromSinglePropertyTest- expected
12:00:00 AM(normal space), but actual contains a narrow no-break space beforeAM(12:00:00\u202FAM)
- expected
Notes / hypotheses
- The newline failures look like the test
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). - The DateTime formatting difference looks like ICU vs Windows NLS culture-data differences for
en-US; building expected fromDateTime.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.
Metadata
Metadata
Assignees
Labels
No labels