This repository has been archived by the owner on Dec 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Some Unit Test for Razor Templating are failing, when global .gitgnore config has core.autocrlf = false #1514
Comments
We decided on using either embedded resource of multiline |
dougbu
added a commit
that referenced
this issue
Jun 22, 2015
- #1514 - refactor `RazorCompilationService` to allow a test subclass that normalizes Razor file line endings - add `TestRazorCompilationService` to `RazorPageExecutionInstrumentationWebSite` - adjust line endings to match in `RazorPageExecutionInstrumentationTest` - add `ignoreLineEndingDifferences: true` to `Assert.Equal()` calls - responses on Windows can have a mix of line endings - `git config` setting affects line endings in .cshtml (and baseline) files - however MVC and Razor mix `Environment.NewLine`s into HTTP responses - update `PrecompilationTest` to split response regardless of line endings - update `ResourceFile` to normalize all source file streams to LF only - ensures consistent checksums and line mappings - change `MvcRazorHostTest` to expect new line mappings - recreate baseline files to expect new checksums and literal line endings - use verbatim strings in affected tests - careful use of `Environment.NewLine` in expectations is now just noise nits: - add doc comments in `RazorCompilationService` - correct `TagHelpersTest` name to match containing file - avoid incorrect `using` removal when `GENERATE_BASELINES` is not defined - remove unnecessary `ResourceFile` normalization of output files
dougbu
added a commit
that referenced
this issue
Jun 24, 2015
- #1514 - refactor `RazorCompilationService` to allow a test subclass that normalizes Razor file line endings - add `TestRazorCompilationService` to `RazorPageExecutionInstrumentationWebSite` - adjust line endings to match in `RazorPageExecutionInstrumentationTest` - add `ignoreLineEndingDifferences: true` to `Assert.Equal()` calls - responses on Windows can have a mix of line endings - `git config` setting affects line endings in .cshtml (and baseline) files - however MVC and Razor mix `Environment.NewLine`s into HTTP responses - update `PrecompilationTest` to split response regardless of line endings - update `ResourceFile` to normalize all source file streams to LF only - ensures consistent checksums and line mappings - change `MvcRazorHostTest` to expect new line mappings - recreate baseline files to expect new checksums and literal line endings - use verbatim strings in affected tests - careful use of `Environment.NewLine` in expectations is now just noise nits: - add doc comments in `RazorCompilationService` - correct `TagHelpersTest` name to match containing file - avoid incorrect `using` removal when `GENERATE_BASELINES` is not defined - remove unnecessary `ResourceFile` normalization of output files
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
that's because of the
.gitignore
the the \r\n and \n problem while comparing input and output.
Steps to reproduce on a windows machine
The text was updated successfully, but these errors were encountered: