toddams / RazorLight

Template engine based on Microsoft's Razor parsing engine for .NET Core
Apache License 2.0
1.53k stars 258 forks source link

Make the tests pass on Unix. #500

Closed MarkKharitonov closed 2 years ago

MarkKharitonov commented 2 years ago

3 kinds of changes had to be made to the unit tests only:

  1. Use / as path separator - understood both on Windows and Unix
  2. Use Environment.NewLine where appropriate instead of hard coding \r\n
  3. Fix the unit tests to use the en-US culture.

The last point raises a question - should the razor engine allow its clients to provide a culture to be used when rendering? After all, the Asp.Net Core does allow to modify the culture through app config or for a single page. But here we do not seem to support it.

jzabroski commented 2 years ago

@MarkKharitonov Thanks, I will focus on getting this up tonight.