toddams / RazorLight

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

Make the tests pass on Unix. #500

Closed MarkKharitonov closed 1 year ago

MarkKharitonov commented 1 year 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 1 year ago

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