Build initial MCP SSH server

This commit is contained in:
Vibe Myass
2026-05-24 20:45:12 +00:00
commit a8f7e8f483
28 changed files with 2116 additions and 0 deletions

View 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);
}
}