Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Get tets working with core.autocrlf=false #2729

Closed
wants to merge 1 commit into from

Commits on Jun 22, 2015

  1. Get tets working with core.autocrlf=false

    - #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 committed Jun 22, 2015
    Configuration menu
    Copy the full SHA
    cc0cec8 View commit details
    Browse the repository at this point in the history