Make --no-build imply --no-restore for pack command.

This commit makes the `--no-build` option for the pack command
automatically imply `--no-restore`.

Fixes issue #7472.
This commit is contained in:
Peter Huene 2017-11-27 21:01:26 -08:00
parent de10b22bcd
commit 40b0e0fcec
18 changed files with 57 additions and 29 deletions

View file

@ -69,6 +69,13 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
return new AndConstraint<CommandResultAssertions>(this);
}
public AndConstraint<CommandResultAssertions> NotHaveStdOutContaining(string pattern)
{
Execute.Assertion.ForCondition(!_commandResult.StdOut.Contains(pattern))
.FailWith(AppendDiagnosticsTo($"The command output contained a result it should not have contained: {pattern}{Environment.NewLine}"));
return new AndConstraint<CommandResultAssertions>(this);
}
public AndConstraint<CommandResultAssertions> HaveStdOutMatching(string pattern, RegexOptions options = RegexOptions.None)
{
Execute.Assertion.ForCondition(Regex.Match(_commandResult.StdOut, pattern, options).Success)