Update tests to reflect portable tools
This commit is contained in:
parent
51dcb6063f
commit
bd3ba0bd41
3 changed files with 78 additions and 8 deletions
|
@ -36,9 +36,9 @@ namespace Microsoft.DotNet.Tests
|
|||
|
||||
try
|
||||
{
|
||||
CommandResult result = new HelloCommand().ExecuteWithCapturedOutput();
|
||||
CommandResult result = new PortableCommand().ExecuteWithCapturedOutput();
|
||||
|
||||
result.Should().HaveStdOut("Hello World!" + Environment.NewLine);
|
||||
result.Should().HaveStdOut("Hello Portable World!" + Environment.NewLine);
|
||||
result.Should().NotHaveStdErr();
|
||||
result.Should().Pass();
|
||||
}
|
||||
|
@ -94,5 +94,25 @@ namespace Microsoft.DotNet.Tests
|
|||
return base.ExecuteWithCapturedOutput(args);
|
||||
}
|
||||
}
|
||||
|
||||
class PortableCommand : TestCommand
|
||||
{
|
||||
public PortableCommand()
|
||||
: base("dotnet")
|
||||
{
|
||||
}
|
||||
|
||||
public override CommandResult Execute(string args = "")
|
||||
{
|
||||
args = $"portable {args}";
|
||||
return base.Execute(args);
|
||||
}
|
||||
|
||||
public override CommandResult ExecuteWithCapturedOutput(string args = "")
|
||||
{
|
||||
args = $"portable {args}";
|
||||
return base.ExecuteWithCapturedOutput(args);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue