iainbrighton / PScribo

PowerShell documentation framework
MIT License
231 stars 35 forks source link

Tests fixed to be aware different decimal separators by cultures #42

Closed it-praktyk closed 7 years ago

it-praktyk commented 7 years ago

Fix #39

iainbrighton commented 7 years ago

@it-praktyk Thanks for the PR.

Question - do you know whether CSS style decimals are culture insensitive? By this I mean is 0,42em a valid CSS property? Obviously this will have a bearing on whether we need to fix the tests or actually fix the code!

iainbrighton commented 7 years ago

@it-praktyk Looking here - one of these lines should be removed https://github.com/iainbrighton/PScribo/blob/dev/Src/Plugins/OutHtml.Internal.ps1#L44-L45 - probably line 45! I think line 44 should always give the same result?

Any chance you can remove line 45 and rerun the tests without your changes?

iainbrighton commented 7 years ago

Also it looks like the decimals have be specified with a decimal point and not a comma. Look at the "Invalid property value" here.

it-praktyk commented 7 years ago

Even after removing the line 45 tests fail.

Yes, probably replacing dots with commas was not the correct idea to resolve that issue, so I'm closing my pull request.

iainbrighton commented 7 years ago

@it-praktyk OK - I've managed to recreate this with this and calling Invoke-Pester 😄. I can see that removing that line did help - that one test - but not the others. I'll get this fixed!