Execute 'csc' with working directory set to the project directory.
When using a ruleset with a relative path in buildOptions, csc can't find the file because it is not working in the same directory as the project. Fix #2710
This commit is contained in:
parent
2827ef208a
commit
f2d917ed2e
10 changed files with 99 additions and 7 deletions
|
@ -81,6 +81,13 @@ namespace Microsoft.DotNet.Tools.Test.Utilities
|
|||
return new AndConstraint<CommandResultAssertions>(this);
|
||||
}
|
||||
|
||||
public AndConstraint<CommandResultAssertions> NotHaveStdErrContaining(string pattern)
|
||||
{
|
||||
Execute.Assertion.ForCondition(!_commandResult.StdErr.Contains(pattern))
|
||||
.FailWith(AppendDiagnosticsTo($"The command error output contained a result it should not have contained: {pattern}{Environment.NewLine}"));
|
||||
return new AndConstraint<CommandResultAssertions>(this);
|
||||
}
|
||||
|
||||
public AndConstraint<CommandResultAssertions> HaveStdErrMatching(string pattern, RegexOptions options = RegexOptions.None)
|
||||
{
|
||||
Execute.Assertion.ForCondition(Regex.Match(_commandResult.StdErr, pattern, options).Success)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue