Closed impworks closed 4 years ago
Not sure why the new test fails on CI. I ran all tests locally without any failures:
Hi there, thanks very much for submitting a PR for this. I'll have a look at the code and then at the build to see whats happening
@impworks I made some changes on your branch to bring the code more inline with the rest of the codebase.
The broken tests were related to the compilation renderer since the spec tests are shared. I worked on adding the culture info setting to the compilation renderer so now everything works as expected.
I'll get a release out for this shortly, please let me know if you have any issues and thank you very much for your contribution.
This PR adds the ability to explicitly specify a locale that will be used when rendering formattable values (
float
,double
,decimal
, etc.) to string.Current spec expects the culture to be invariant, but never enforces it, so existing tests like "Basic Decimal Interpolation" fail on my machine because my locale is Russian and the decimal separator is a comma instead of a dot (weird, I know).
From now on, values be rendered using
CultureInfo.InvariantCulture
unless specified otherwise.