Files
mcp-ssh/tests/McpSsh.Tests/RemoteShellCommandTests.cs
2026-05-24 20:45:12 +00:00

21 lines
456 B
C#

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