Remove duplicated code

This commit is contained in:
Viktor Liu
2025-07-03 03:17:00 +02:00
parent 04bb314426
commit 3e490d974c
8 changed files with 70 additions and 104 deletions

View File

@@ -475,8 +475,9 @@ func TestSSHServer_WindowsShellHandling(t *testing.T) {
// Test Unix shell behavior
args := server.getShellCommandArgs("/bin/sh", "echo test")
assert.Equal(t, "/bin/sh", args[0])
assert.Equal(t, "-c", args[1])
assert.Equal(t, "echo test", args[2])
assert.Equal(t, "-l", args[1])
assert.Equal(t, "-c", args[2])
assert.Equal(t, "echo test", args[3])
}
}