mirror of
https://github.com/Tyrrrz/CliFx.git
synced 2025-10-25 15:19:17 +00:00
More consistent code style
This commit is contained in:
@@ -31,7 +31,8 @@ public class ConsoleSpecs : SpecsBase
|
|||||||
var command = "Hello world" | Cli.Wrap("dotnet")
|
var command = "Hello world" | Cli.Wrap("dotnet")
|
||||||
.WithArguments(a => a
|
.WithArguments(a => a
|
||||||
.Add(Dummy.Program.Location)
|
.Add(Dummy.Program.Location)
|
||||||
.Add("console-test"));
|
.Add("console-test")
|
||||||
|
);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var result = await command.ExecuteBufferedAsync();
|
var result = await command.ExecuteBufferedAsync();
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ public class DirectivesSpecs : SpecsBase
|
|||||||
var command = Cli.Wrap("dotnet")
|
var command = Cli.Wrap("dotnet")
|
||||||
.WithArguments(a => a
|
.WithArguments(a => a
|
||||||
.Add(Dummy.Program.Location)
|
.Add(Dummy.Program.Location)
|
||||||
.Add("[debug]")) | stdOutBuffer;
|
.Add("[debug]")
|
||||||
|
) | stdOutBuffer;
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
try
|
try
|
||||||
@@ -57,7 +58,7 @@ public class DirectivesSpecs : SpecsBase
|
|||||||
}
|
}
|
||||||
catch (OperationCanceledException)
|
catch (OperationCanceledException)
|
||||||
{
|
{
|
||||||
// It's expected to fail
|
// This is expected
|
||||||
}
|
}
|
||||||
|
|
||||||
var stdOut = stdOutBuffer.ToString();
|
var stdOut = stdOutBuffer.ToString();
|
||||||
|
|||||||
@@ -246,9 +246,11 @@ public class Command : ICommand
|
|||||||
var command = Cli.Wrap("dotnet")
|
var command = Cli.Wrap("dotnet")
|
||||||
.WithArguments(a => a
|
.WithArguments(a => a
|
||||||
.Add(Dummy.Program.Location)
|
.Add(Dummy.Program.Location)
|
||||||
.Add("env-test"))
|
.Add("env-test")
|
||||||
|
)
|
||||||
.WithEnvironmentVariables(e => e
|
.WithEnvironmentVariables(e => e
|
||||||
.Set("ENV_TARGET", "Mars"));
|
.Set("ENV_TARGET", "Mars")
|
||||||
|
);
|
||||||
|
|
||||||
// Act
|
// Act
|
||||||
var result = await command.ExecuteBufferedAsync();
|
var result = await command.ExecuteBufferedAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user