Test: Skript ohne Zeilenfortsetzung (#712)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard
2026-09-25 22:55:49 +02:00
co-authored by Claude Opus 5.5
parent 367ea387f6
commit a76983aa28
@@ -165,14 +165,13 @@ public sealed class McpSocketTests : IDisposable
var agentDir = Path.Combine(host.InstancePath, "Agents", "Agent-coder");
Directory.CreateDirectory(Path.Combine(agentDir, "Workspace"));
const string script = """
printf '%s\n' \
'{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"t","version":"1"}}}' \
'{"jsonrpc":"2.0","id":2,"method":"tools/list"}' \
'{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"Echo","arguments":{}}}' \
| "$CLAWD_HELPER" --mcp-bridge --socket "$CLAWD_MCP_SOCKET"
echo done > /work/result.txt
""";
// One command per line: the file's line endings must not decide what the shell sees.
var script = string.Join("\n",
"""m1='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"t","version":"1"}}}'""",
"""m2='{"jsonrpc":"2.0","id":2,"method":"tools/list"}'""",
"""m3='{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"Echo","arguments":{}}}'""",
"""printf '%s\n' "$m1" "$m2" "$m3" | "$CLAWD_HELPER" --mcp-bridge --socket "$CLAWD_MCP_SOCKET" """,
"echo done > /work/result.txt");
var agent = new AgentConfig
{
AgentId = "coder", AgentDir = agentDir, WorkspacePath = Path.Combine(agentDir, "Workspace"),