Open
Description
Those tests (in command-line-api\src\System.CommandLine.Tests\Binding\TypeConversionTests.cs) fail as is assumed that dot ('.') is always the decimal separator what is not true for pt-BR, or perhaps the parsing should use invariant culture to standardize the decimal separator
[Fact]
public void Values_can_be_correctly_converted_to_decimal_without_the_parser_specifying_a_custom_converter()
=> GetValue(new CliOption<decimal>("-x"), "-x 123.456").Should().Be(123.456m);
[Fact]
public void Values_can_be_correctly_converted_to_nullable_decimal_without_the_parser_specifying_a_custom_converter()
=> GetValue(new CliOption<decimal?>("-x"), "-x 123.456").Should().Be(123.456m);
[Fact]
public void Values_can_be_correctly_converted_to_double_without_the_parser_specifying_a_custom_converter()
=> GetValue(new CliOption<double>("-x"), "-x 123.456").Should().Be(123.456d);
[Fact]
public void Values_can_be_correctly_converted_to_nullable_double_without_the_parser_specifying_a_custom_converter()
=> GetValue(new CliOption<double?>("-x"), "-x 123.456").Should().Be(123.456d);
[Fact]
public void Values_can_be_correctly_converted_to_float_without_the_parser_specifying_a_custom_converter()
=> GetValue(new CliOption<float>("-x"), "-x 123.456").Should().Be(123.456f);
Metadata
Metadata
Assignees
Labels
No labels