Hide restore output of first-run experience (#4740)

* Fix 4066

* Merge Conflict

* Move fix to the DotNetCommandFactory

* More normalization

The `\r\n` issue is oddly non-deterministic. This change did not affect the message endings and yet CI started failing. Normalizing both string should have the desired result...
This commit is contained in:
Piotr Puszkiewicz 2016-11-28 00:46:26 -08:00 committed by GitHub
parent 7b0117ac85
commit b47d728516
6 changed files with 29 additions and 9 deletions

View file

@ -57,7 +57,7 @@ namespace Microsoft.DotNet.Tests
[Fact]
public void It_shows_the_appropriate_message_to_the_user()
{
const string firstTimeUseWelcomeMessage = @"Welcome to .NET Core!
string firstTimeUseWelcomeMessage = NormalizeLineEndings(@"Welcome to .NET Core!
---------------------
Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
Telemetry
@ -67,12 +67,12 @@ You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environmen
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
Configuring...
-------------------
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.";
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.");
// normalizing line endings as git is occasionally replacing line endings in this file causing this test to fail
NormalizeLineEndings(_firstDotnetVerbUseCommandResult.StdOut)
.Should()
.StartWith(NormalizeLineEndings(firstTimeUseWelcomeMessage));
.Should().StartWith(firstTimeUseWelcomeMessage)
.And.NotContain("Restore completed in");
}
[Fact]