Build initial MCP SSH server
This commit is contained in:
20
tests/McpSsh.Tests/RemoteShellCommandTests.cs
Normal file
20
tests/McpSsh.Tests/RemoteShellCommandTests.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using McpSsh.Server.Ssh;
|
||||
|
||||
namespace McpSsh.Tests;
|
||||
|
||||
public sealed class RemoteShellCommandTests
|
||||
{
|
||||
[Fact]
|
||||
public void Build_ReturnsCommandWhenCwdIsMissing()
|
||||
{
|
||||
Assert.Equal("pwd", RemoteShellCommand.Build("pwd", null));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Build_PrependsQuotedCwd()
|
||||
{
|
||||
var command = RemoteShellCommand.Build("ls", "/srv/app's/current");
|
||||
|
||||
Assert.Equal("cd '/srv/app'\\''s/current' && ls", command);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user